You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, the error type is :csrf_detected, and the :reason is "Invalid 'state' parameter".
After looking at the gem's code and doing a few tests, I realized that the session changes between requests, i.e., between the authorization request (https://login.microsoftonline.com/common/oauth2/v2.0/authorize) and the callback request (redirect_uri: "#{ENV['APP_DOMAIN']}/omniauth/microsoft_office365/callback"). I printed the session id and it is indeed different. Hence, the stored_state and the nonce values, which are stored between requests in the session, will always be nil.
Why does this happen? Is anyone else facing this issue? What can I be doing wrong?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Hi, I'm using this gem to support sign-in with Microsoft365. For compatibility reasons, I have to use version 0.6.1 and with Devise.
Using the
discovery
option doesn't work.Here's the configuration:
I get an "Issuer mismatch" error, although the link https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration does retrieve a valid configuration.
So, I tried without
discovery: true
, and here's the configuration I used:Now, the error type is
:csrf_detected
, and the:reason
is "Invalid 'state' parameter".After looking at the gem's code and doing a few tests, I realized that the session changes between requests, i.e., between the authorization request (
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
) and the callback request (redirect_uri: "#{ENV['APP_DOMAIN']}/omniauth/microsoft_office365/callback"
). I printed the session id and it is indeed different. Hence, thestored_state
and thenonce
values, which are stored between requests in the session, will always benil
.Why does this happen? Is anyone else facing this issue? What can I be doing wrong?
Thanks in advance!
The text was updated successfully, but these errors were encountered: