tebakaja commited on
Commit
a6dea8b
·
1 Parent(s): d3cdb3c

migrate: GCP to Hugging Face

Browse files
Files changed (1) hide show
  1. api/oauth2.py +2 -5
api/oauth2.py CHANGED
@@ -1,4 +1,3 @@
1
- import base64
2
  from typing import List
3
  from fastapi import Depends, HTTPException, status
4
  from fastapi_jwt_auth import AuthJWT
@@ -17,10 +16,8 @@ class Settings(BaseModel):
17
  authjwt_access_cookie_key: str = 'access_token'
18
  authjwt_refresh_cookie_key: str = 'refresh_token'
19
  authjwt_cookie_csrf_protect: bool = False
20
- authjwt_public_key: str = base64.b64decode(
21
- settings.JWT_PUBLIC_KEY).decode('utf-8')
22
- authjwt_private_key: str = base64.b64decode(
23
- settings.JWT_PRIVATE_KEY).decode('utf-8')
24
 
25
 
26
  @AuthJWT.load_config
 
 
1
  from typing import List
2
  from fastapi import Depends, HTTPException, status
3
  from fastapi_jwt_auth import AuthJWT
 
16
  authjwt_access_cookie_key: str = 'access_token'
17
  authjwt_refresh_cookie_key: str = 'refresh_token'
18
  authjwt_cookie_csrf_protect: bool = False
19
+ authjwt_public_key: str = settings.JWT_PUBLIC_KEY
20
+ authjwt_private_key: str = settings.JWT_PRIVATE_KEY
 
 
21
 
22
 
23
  @AuthJWT.load_config