Auth: implement auto_sign_up for auth.jwt (#43502)

Co-authored-by: James Brown <jbrown@easypost.com>
This commit is contained in:
Emil Tullstedt
2022-01-13 17:15:22 +01:00
committed by GitHub
co-authored by James Brown
parent 45287b4129
commit 25736b6afb
7 changed files with 118 additions and 4 deletions
+5
View File
@@ -44,8 +44,13 @@ username_claim = sub
# Specify a claim to use as an email to sign in.
email_claim = sub
# auto-create users if they are not already matched
# auto_sign_up = true
```
If `auto_sign_up` is enabled, then the `sub` claim is used as the "external Auth ID". The `name` claim is used as the user's full name if it is present.
## Signature verification
JSON web token integrity needs to be verified so cryptographic signature is used for this purpose. So we expect that every token must be signed with some known cryptographic key.