juhanakristian / remix-auth-microsoft

Microsoft authentication strategy for remix-auth
MIT License
37 stars 19 forks source link

[Help] Login returns a 401 and doesn't redirect to /success nor /login #5

Closed nunocasteleira closed 2 years ago

nunocasteleira commented 2 years ago

Hi! I'm implementing this strategy on a remix dummy app as a Proof of Concept but I cannot get past the authentication.

I'm using a single tenant sign-in and I've tried with a different app registration just for this purpose.\ Got the Client ID, Client Secret and Tenant ID but I still get a 401 whenever I try to login with anyone from my company.

Can you pinpoint what I may be doing wrong? Perhaps it is a misconfiguration on Azure Portal?

nunocasteleira commented 2 years ago

Ok, turns out I was using the Client Secret ID and not the value. I was able to login now. Thanks for developing and maintaining this strategy!

nunocasteleira commented 2 years ago

For anyone trying to apply this strategy to a Blues Stack, you have to delete maxAge: 0 from createCookieSessionStorage(), otherwise the cookie won't persist!