-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I verify the token on another server? #131
Comments
@dalbodeule, if you are interested, I have implemented a basic (really basic) JWT in this PR: #17. You can find the logic to obtain the tokens there. You will also see how to add the tokens to the headers or refresh the token. |
I checked. But I don't know. In the end, I decided to create a Session on the server and then verify it in this project. But thanks for your help. |
What I did with @sidebase/nuxt-auth was reverse engineer the way they encrypt the cookie. So there you have it. If you want to encrypt/decrypt, seal/unseal the data on a server (and validating the cookie in the process) you'd have to use the iron method to do so. You could write all the logic yourself like pi0 did in h3, but here are some packages that can do it for you: JS:
PHP:
This way you require the same password used in the frontend to seal the data on your server. You could also store the jwt in the cookie and validate it seperately on the server too. |
I ran into a problem while creating a project.
After implementing Discord OAuth in Nuxt, the Token coming from it had to be verified in another backend, which became a bit complicated.
I don't recommend this, but I think I have to use this method due to my project structure. If so,
I want to know about
The text was updated successfully, but these errors were encountered: