Skip to content
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

signInUser not setting headers. #70

Open
megha492 opened this issue May 31, 2022 · 1 comment
Open

signInUser not setting headers. #70

megha492 opened this issue May 31, 2022 · 1 comment

Comments

@megha492
Copy link

SignInUser is neither setting headers nor persisting the headers in the local storage even after successful login signInRequestSucceeded.

@dlikhten
Copy link

dlikhten commented May 1, 2023

so far, seeing a similar problem, but this appears to be caused by the server response and/or environment, not the library. I checked if a console fetch will have similar issues, and the headers are not readable. Therefore this library is also not seeing the headers when needed. Given a lack of any other information I have to go on this.

I know it is a year late response, but hopefully helpful to anyone coming across this. Related to the CORS functionality, auth headers can't be read by xhr by standard configs.

I'm sure there's some other considerations I need to make, but you'd need to expose them in your CORS config, so an example from rails:

resource "/auth/*",
             headers: :any,
             expose: %w[access-token expiry token-type uid client],
             methods: [:get, :post, :put, :patch, :delete, :options, :head]

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

2 participants