Skip to content

Commit

Permalink
Url to string conversion for authentic auth method
Browse files Browse the repository at this point in the history
  • Loading branch information
dyakovri authored Nov 24, 2024
1 parent 08ee529 commit d46e05d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions auth_backend/auth_plugins/authentic.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def __get_token(cls, code: str) -> dict[str]:
"code": code,
"client_id": cls.settings.AUTHENTIC_CLIENT_ID,
"client_secret": cls.settings.AUTHENTIC_CLIENT_SECRET,
"redirect_uri": cls.settings.AUTHENTIC_REDIRECT_URL,
"redirect_uri": str(cls.settings.AUTHENTIC_REDIRECT_URL),
},
headers={"Accept": "application/x-www-form-urlencoded"},
) as response:
Expand Down Expand Up @@ -256,7 +256,7 @@ async def _login(cls, user_inp: OauthResponseSchema, background_tasks: Backgroun
@classmethod
async def _redirect_url(cls):
"""URL на который происходит редирект после завершения входа на стороне провайдера"""
return OauthMeta.UrlSchema(url=cls.settings.AUTHENTIC_REDIRECT_URL)
return OauthMeta.UrlSchema(url=str(cls.settings.AUTHENTIC_REDIRECT_URL))

@classmethod
async def _auth_url(cls):
Expand All @@ -265,7 +265,7 @@ async def _auth_url(cls):
return OauthMeta.UrlSchema(
url=f'{authorize_url}'
f'?client_id={cls.settings.AUTHENTIC_CLIENT_ID}'
f'&redirect_uri={quote(cls.settings.AUTHENTIC_REDIRECT_URL)}'
f'&redirect_uri={quote(str(cls.settings.AUTHENTIC_REDIRECT_URL))}'
f'&scope=openid,tvoyff-manage-password'
f'&response_type=code'
)
Expand Down

0 comments on commit d46e05d

Please sign in to comment.