Download apps/web/src/utils/auth.ts from fukeke/rss: direct link, hf CLI and curl.
- Browser
- Download file 404 Bytes
-
https://huggingface.co/spaces/fukeke/rss/resolve/main/apps/web/src/utils/auth.ts
- Command line
-
hf download hf://spaces/fukeke/rss/apps/web/src/utils/auth.ts
-
curl -L -o auth.ts https://huggingface.co/spaces/fukeke/rss/resolve/main/apps/web/src/utils/auth.ts
404 Bytes
| let token: string | null = null; | |
| export const getAuthCode = () => { | |
| if (token !== null) { | |
| return token; | |
| } | |
| token = window.localStorage.getItem('authCode'); | |
| return token; | |
| }; | |
| export const setAuthCode = (authCode: string | null) => { | |
| token = authCode; | |
| if (!authCode) { | |
| window.localStorage.removeItem('authCode'); | |
| return; | |
| } | |
| window.localStorage.setItem('authCode', authCode); | |
| }; | |