#Logging in and setting JWT or cookies with custom auth (Google OAuth)
1 messages · Page 1 of 1 (latest)
Help is on the way! To mark it as solved, use the /solve command. In the meantime, here are some existing threads that may help you:
Documentation:
- JWT Strategy - Identifying Users Via The Authorization Header
- Cookie Strategy - CSRF Prevention - Cross domain authentication - 2. Configure cookies
- Authentication Overview - Strategies - HTTP-Only Cookies
Community-Help:
It's kind of more, where do I store the jwt token when I generate this, or if I store this cookie, how do I link these forms of auth to Payload, i.e. how would payload know I'm logged in with these auth strategies?
Hey man! You might want to check this: https://payloadcms.com/docs/authentication/custom-strategies
I've tried looking into that although it seems to produce all sorts of errors such as 400 when I request POST /payload/api/user/login or 403 whenever I try to signin with a different auth strategy, i.e. sending a google auth token (it expects a password when this is a different auth strategy)
Hey mate did you manage to set it up?
Haha I thought of implementing auth without payload anymore as the custom auth strategies seemed quite finicky
I ended up using bcrypt and JWT
I wanted both standard auth and google oauth so used JWT to encrypt the both of them
Hello @vale dirge how did you manage completing your requirement?
I ended up disabling payload auth and using our own auth implementation with bcrypt and google apis
Thank you for the speedy reply.
Did you also make any modifications on the AUTH operations?
AUTH operations?
We completely no longer use payload auth anymore for our custom apis
Yeah this is the one I am speaking about