mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-16 23:39:56 +00:00
feat: read username if email is not available for oauth provider
Also add recipe for OAuth with GitHub setup
This commit is contained in:
@ -130,7 +130,7 @@ class OAuth(Mapping):
|
||||
client.access_token = access_token
|
||||
|
||||
user, _ = await client.user_info()
|
||||
username: str = user.email # type: ignore[attr-defined]
|
||||
username: str = user.email or user.username # type: ignore[attr-defined]
|
||||
return username
|
||||
except Exception:
|
||||
self.logger.exception("got exception while performing request")
|
||||
|
Reference in New Issue
Block a user