refactor pilots

This commit is contained in:
Cayo Puigdefabregas 2024-01-21 11:35:24 +01:00
parent a4e6e42d34
commit 27c56a9204
1 changed files with 6 additions and 1 deletions

View File

@ -193,10 +193,15 @@ class OAuth2VPToken(models.Model):
return response
response["verify"] = "Ok, Verification correct"
response["redirect_uri"] = self.get_redirect_url()
url = self.get_redirect_url()
if url:
response["redirect_uri"] = url
return response
def get_redirect_url(self):
if not settings.ALLOW_CODE_URI:
return
data = {
"code": self.authorization.code,
}