API - add refresh token
This commit is contained in:
@ -19,7 +19,7 @@ def create_oauth_client(metadata: Dict, user: User) -> OAuth2Client:
|
||||
'client_uri': metadata['client_uri'],
|
||||
'redirect_uris': metadata['redirect_uris'],
|
||||
'scope': metadata['scope'],
|
||||
'grant_types': ['authorization_code'],
|
||||
'grant_types': ['authorization_code', 'refresh_token'],
|
||||
'response_types': ['code'],
|
||||
'token_endpoint_auth_method': 'client_secret_post',
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
from authlib.oauth2.rfc7636 import CodeChallenge
|
||||
from flask import Flask
|
||||
|
||||
from .grants import AuthorizationCodeGrant
|
||||
from .grants import AuthorizationCodeGrant, RefreshTokenGrant
|
||||
from .server import authorization_server
|
||||
|
||||
|
||||
@ -12,3 +12,4 @@ def config_oauth(app: Flask) -> None:
|
||||
authorization_server.register_grant(
|
||||
AuthorizationCodeGrant, [CodeChallenge(required=True)]
|
||||
)
|
||||
authorization_server.register_grant(RefreshTokenGrant)
|
||||
|
Reference in New Issue
Block a user