mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
bump version
This commit is contained in:
43 files changed
+96
-53
No files matched your search
@@ -13,6 +13,7 @@ export default class LoginWithGithubService extends Service {
|
||||
id: Schema.string().description('Github OAuth AppID').required(),
|
||||
secret: Schema.string().description('Github OAuth Secret').role('secret').required(),
|
||||
endpoint: Schema.string().description('Github Endpoint'),
|
||||
canRegister: Schema.boolean().default(true),
|
||||
});
|
||||
|
||||
constructor(ctx: Context, config: ReturnType<typeof LoginWithGithubService.Config>) {
|
||||
@@ -21,6 +22,7 @@ export default class LoginWithGithubService extends Service {
|
||||
text: 'Login with Github',
|
||||
name: 'Github',
|
||||
icon,
|
||||
canRegister: config.canRegister,
|
||||
callback: async function callback({ state, code }) {
|
||||
const s = await TokenModel.get(state, TokenModel.TYPE_OAUTH);
|
||||
if (!s) throw new ValidationError('token');
|
||||
|
||||
Reference in new issue
Block a user