Replies: 1 comment
-
hey @copleykj did you ever figure this out? trying to hit an undocumented Retool API endpoint for bulk inviting users, and would love to fetch a CSRF token to enable such a request |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
So basically I've got an app that is setup with a credentials provider to take a username/password, and everything works perfectly well when logging in from the form provided by next auth on the signin page. Now what I would like to do is use Retools custom auth flow to send the username and password to the
/api/callback/credentials
endpoint and "log in".Currently I have the flow get the csrf token from
/api/auth/csrf
, then set the csrfToken in the form with the username and password and the appropriate cookie header with the csrfToken set as the value. The thing is that when I make the request I can see the request hit the endpoint, but authorize callback never runs and everything just sort of fails silently. My guess is that it has something to do with csrf because the request gets a redirect to the/auth/signin
url with?csrf=true
set as the query.So I guess what I need to know is if this is possible, and if so, can you point me in some sort of decent direction to debug this and make it work?
Beta Was this translation helpful? Give feedback.
All reactions