mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-10-18 02:38:03 +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:
1 parent
9e1cf3cde7
commit
ed7ed5d5d9
7 files changed
+115
-1
No files matched your search
@@ -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