mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
* Fix #630: use relative tokenUrl as per the official recommendations * Improve following review comments * Fix unmatching backtick * Improve consistency of authentication backend documentation
This commit is contained in:
@@ -45,7 +45,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@@ -54,7 +54,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@@ -56,7 +56,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@@ -54,7 +54,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
fastapi_users = FastAPIUsers(
|
||||
|
||||
@@ -49,7 +49,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@@ -69,7 +69,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@@ -67,7 +67,7 @@ def after_verification_request(user: UserDB, token: str, request: Request):
|
||||
|
||||
|
||||
jwt_authentication = JWTAuthentication(
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="/auth/jwt/login"
|
||||
secret=SECRET, lifetime_seconds=3600, tokenUrl="auth/jwt/login"
|
||||
)
|
||||
|
||||
fastapi_users = FastAPIUsers(
|
||||
|
||||
Reference in New Issue
Block a user