-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate real jwt token for auth
- Loading branch information
1 parent
0125349
commit d03d27d
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d03d27d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the 'secret_key'. The documentation only mentions sending username and password
d03d27d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SiimonStark
'secret_key' is not a problem for consumers. It is a key that is used to sign the token. When you request something from the server using this token, this 'secret_key' will be used to verify that the token I s signed with this server
d03d27d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is part of the signing jwt, you need payload (here the name of user), the 'secret key', (generally a env var) and the 'expires in' for the life span of the token.