okta-auth-js
okta-auth-js copied to clipboard
Custom localStorage or cookie name
Is it possible to issue a custom name for local storage or cookie?
okta-token-storage to something different.
Reason is that we dont want user to know what our login system is.
Does this meet your needs? https://github.com/okta/okta-auth-js/blob/master/package.json#L61
Questions (as opposed to bug reports or feature requests) about the SDKs are better directed at https://devforum.okta.com/
Hope that helps! Closing this issue, but if that doesn't work for you and you have a bug report/feature request related to this, feel free to re-open this issue or create a new one.
I tried adding
"okta-auth-js": {
"STATE_TOKEN_KEY_NAME": "customNameStateToken",
"DEFAULT_POLLING_DELAY": 500,
"DEFAULT_MAX_CLOCK_SKEW": 300,
"DEFAULT_CACHE_DURATION": 86400,
"FRAME_ID": "customName-oauth-helper-frame",
"REDIRECT_OAUTH_PARAMS_COOKIE_NAME": "customName-oauth-redirect-params",
"REDIRECT_STATE_COOKIE_NAME": "customName-oauth-state",
"REDIRECT_NONCE_COOKIE_NAME": "customName-oauth-nonce",
"TOKEN_STORAGE_NAME": "customName-token-storage",
"CACHE_STORAGE_NAME": "customName-cache-storage"
}
into the root package.json file but nothing is happening
auth-js doesn't support such customization today. as work around, you have to fork and build your own version
Nowadays you can do it easily:
https://github.com/okta/okta-auth-js#storagekey