Share feedback, ideas and get community help

Updated 6 months ago

Authentication by token in the URL

At a glance

The community member is trying to implement user authentication using a token passed in the URL. They want to authenticate the user and sign them in without using the existing sign-in forms in the application. The community members discuss using a webhook block to handle the authentication process, where the token would be passed in the Authorization header. However, the community members note that modifying the application to handle this custom authentication flow is technically complex and outside the scope of the product. The community members also mention that the application is currently using NextAuth.js for authentication.

Useful resources
Hi, I'm trying to implement authentication of my user through a token that I pass in the url. The idea would be to perform the authentication just by passing this token and validating that he has permission to proceed, but know how do I can do login with this authentication.
The user is already created in the database, I just want to authenticate and sign in
B
B
6 comments
You should be able to do that with a webhook block. Just enter your URL, change the method to GET and add Header with key: Authorization and value: Bearer {{Token}} where {{Token}} is your token variable
The idea would be not to use the existing SignIn forms in typebot (github, gitlab, Facebook, etc.) , and to do it only through this token in the URL. This token would come from another external API and when it arrives at typebot, it would retrieve that user's email and check if they have a user already created in typebot. If so, it updates the session and signs in to typebot with that user. Would that be possible?
Oh, you're talking about modifying the app, I did not understand.

Well everything is possible but I can't really provide help for that as it is technical and out of the product's scope πŸ™
Can you briefly explain how authentication works? I'm a bit confused about how to follow it. In a nutshell, I can already retrieve the user's information with the token it's already created in the typebot database, I just can't update the session and authenticate this guy. I'm a beginner in this area, but I'm really enjoying it! Thank you very much for replying!!! πŸ™πŸΌ
Currently it is using Nextauth: https://next-auth.js.org/
Add a reply
Sign up and join the conversation on Discord