(path?: string)
| 46 | * redirect-mode sign in, or an in-app browser). Clears it with no path. |
| 47 | */ |
| 48 | export const setAuthReturnPath = (path?: string): void => { |
| 49 | try { |
| 50 | if (path) { |
| 51 | window.sessionStorage.setItem(AUTH_RETURN_PATH_KEY, path); |
| 52 | } else { |
| 53 | window.sessionStorage.removeItem(AUTH_RETURN_PATH_KEY); |
| 54 | } |
| 55 | } catch { |
| 56 | // The page works without it; only redirect-mode sign in loses its way back. |
| 57 | } |
| 58 | }; |
| 59 | |
| 60 | export const getCookiesAndHeadersFromRequest = ( |
| 61 | req: GetServerSidePropsContext['req'], |
no outgoing calls
no test coverage detected