mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Store accessToken in cookies instead of localStorage
This commit is contained in:
parent
cad3233da7
commit
7ef55ec578
27 changed files with 137 additions and 114 deletions
|
@ -2,12 +2,24 @@ const SERVER_BASE_URL =
|
|||
process.env.REACT_APP_SERVER_BASE_URL ||
|
||||
(process.env.NODE_ENV === 'production' ? '' : 'http://localhost:1337');
|
||||
|
||||
const POSITION_GAP = 65535;
|
||||
const FETCH_OPTIONS =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? undefined
|
||||
: {
|
||||
credentials: 'include',
|
||||
};
|
||||
|
||||
const ACCESS_TOKEN_KEY = 'accessToken';
|
||||
const ACCESS_TOKEN_EXPIRES = 365;
|
||||
|
||||
const POSITION_GAP = 65535;
|
||||
const ACTIONS_LIMIT = 10;
|
||||
|
||||
export default {
|
||||
SERVER_BASE_URL,
|
||||
FETCH_OPTIONS,
|
||||
ACCESS_TOKEN_KEY,
|
||||
ACCESS_TOKEN_EXPIRES,
|
||||
POSITION_GAP,
|
||||
ACTIONS_LIMIT,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue