mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-10 01:00:28 +03:00
initial commit
This commit is contained in:
commit
026f835a87
176 changed files with 10613 additions and 0 deletions
19
src/client/state/auth.js
Normal file
19
src/client/state/auth.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import cons from './cons';
|
||||
|
||||
function getSecret(key) {
|
||||
return localStorage.getItem(key);
|
||||
}
|
||||
|
||||
const isAuthanticated = () => getSecret(cons.secretKey.ACCESS_TOKEN) !== null;
|
||||
|
||||
const secret = {
|
||||
accessToken: getSecret(cons.secretKey.ACCESS_TOKEN),
|
||||
deviceId: getSecret(cons.secretKey.DEVICE_ID),
|
||||
userId: getSecret(cons.secretKey.USER_ID),
|
||||
baseUrl: getSecret(cons.secretKey.BASE_URL),
|
||||
};
|
||||
|
||||
export {
|
||||
isAuthanticated,
|
||||
secret,
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue