from srht.config import cfg from srht.oauth import AbstractOAuthService from names.types import User client_id = cfg("names.sr.ht", "oauth-client-id") client_secret = cfg("names.sr.ht", "oauth-client-secret") gitsrht_cid = cfg("git.sr.ht", "oauth-client-id") class NamesOAuthService(AbstractOAuthService): def __init__(self): super().__init__(client_id, client_secret, required_scopes=[ "profile", f"{gitsrht_cid}/data", f"{gitsrht_cid}/info:write", ], user_class=User)