Closed mdodell closed 2 years ago
I am currently testing rodauth to see if it could be a good use for some of my Rails API only apps.
rodauth
I made a basic demo following the Omniauth tutorial but in API only mode.
When I try to make a POST request to the endpoint http://localhost:3000/auth/facebookvia a separate React app, I get a CSRF error:
POST
http://localhost:3000/auth/facebook
<ActionController::InvalidAuthenticityToken: ActionController::InvalidAuthenticityToken>
You can see this reproduced on Postman here.
I'm relatively new to figuring out auth in an API Only environment, so my apologies if this is a poor issue.
I'd be happy to reopen this as a discussion if it is a non-issue/something in my misunderstanding of omniauth.
I was able to solve this - my issue was that I wasn't calling it from Facebook's authorizing grant with Rodauth as a redirect_uri, but rather directly from Postman. This was my mistake!
redirect_uri
I am currently testing
rodauth
to see if it could be a good use for some of my Rails API only apps.I made a basic demo following the Omniauth tutorial but in API only mode.
When I try to make a
POST
request to the endpointhttp://localhost:3000/auth/facebook
via a separate React app, I get a CSRF error:You can see this reproduced on Postman here.
I'm relatively new to figuring out auth in an API Only environment, so my apologies if this is a poor issue.
I'd be happy to reopen this as a discussion if it is a non-issue/something in my misunderstanding of omniauth.