Skip to content

Cache location provided is not valid #104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
skyshine999 opened this issue Jun 24, 2019 · 2 comments
Closed

Cache location provided is not valid #104

skyshine999 opened this issue Jun 24, 2019 · 2 comments

Comments

@skyshine999
Copy link

ClientConfigurationError: The cache location provided is not valid. Provided value: sessionStorage. Possible values are: localStorage, sessionStorage.

This error is located at:
in AzureAD (at App.js:36)
in App (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)
AuthError
tslib.js:160:8
ClientAuthError
tslib.js:116:19
ClientConfigurationError
Utils.js:165:32
createInvalidCacheLocationConfigError
Utils.js:181:37
UserAgentApplication
AzureAD.js:59:61
MsalAuthProvider
MsalAuthProvider.js:55:36
MsalPopupAuthProvider
MsalPopupAuthProvider.js:41:22
getAuthProvider

AzureAD
B2cAuthority.js:17:59
constructClassInstance
Easing.js:125:11
updateClassComponent
iterableToArrayLimit.js:8:21
performUnitOfWork
factoryWithTypeCheckers.js:281:11
workLoop
factoryWithTypeCheckers.js:313:15
renderRoot

performWorkOnRoot
MatrixMath.js:20:19
performWork
deprecatedPropType.js:22:68
performSyncWork
react-is.development.js:217:8
requestWork
react-is.development.js:124:11
scheduleWork
react-is.production.min.js:14:295
scheduleRootUpdate
MatrixMath.js:490:12
render

renderApplication
PickerAndroid.android.js:103:37
run

runApplication
YellowBoxWarning.js:55:46
__callFunction
ReactNativeART.js:382:6

ReactNativeART.js:157:51
__guard
ReactNativeART.js:335:13
callFunctionReturnFlushedQueue
ReactNativeART.js:157:33
callFunctionReturnFlushedQueue
[native code]

@DocCaliban
Copy link

@suresh777 Their documentation should be updated
You can change your code like follows

  const config = {
    auth: {
      authority: 'https://login.microsoftonline.com/tfp/<your-tenant-name>.onmicrosoft.com/<your-sign-in-sign-up-policy>',
      clientId: '<Application ID for your application>',
      redirectUri: '<Optional redirect URI for your application'
    },
    cache: {
      cacheLocation:  "sessionStorage" as CacheLocation
      storeAuthStateInCookie: true
    }
  };

@AndrewCraswell
Copy link
Contributor

Closing this in favor of #95. This should be a good first issue to fix, unless someone can submit a fix for it I will see if I can find some time in the next few weeks. I'll be out of town frequently though so it will be delayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants