feat(auth): persist cookie based apiKey in document.cookie (#8689)
Refs #8683
This commit is contained in:
@@ -273,11 +273,12 @@ export function restoreAuthorization(payload) {
|
||||
|
||||
export const persistAuthorizationIfNeeded = () => ( { authSelectors, getConfigs } ) => {
|
||||
const configs = getConfigs()
|
||||
if (configs.persistAuthorization)
|
||||
{
|
||||
const authorized = authSelectors.authorized()
|
||||
localStorage.setItem("authorized", JSON.stringify(authorized.toJS()))
|
||||
}
|
||||
|
||||
if (!configs.persistAuthorization) return
|
||||
|
||||
// persist authorization to local storage
|
||||
const authorized = authSelectors.authorized().toJS()
|
||||
localStorage.setItem("authorized", JSON.stringify(authorized))
|
||||
}
|
||||
|
||||
export const authPopup = (url, swaggerUIRedirectOauth2) => ( ) => {
|
||||
|
||||
Reference in New Issue
Block a user