You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
487 B
18 lines
487 B
import { oauthManager } from '#server/service/oauth/oauth-manager';
|
|
import { createAuthContext } from '#server/service/auth/context';
|
|
|
|
export default defineWrappedResponseHandler(async (event) => {
|
|
const { requireUser } = createAuthContext(event);
|
|
const user = await requireUser();
|
|
|
|
const body = await readBody(event);
|
|
const { bindingToken } = body;
|
|
|
|
return R.success({
|
|
success: true,
|
|
binding: {
|
|
provider: 'github',
|
|
username: user.username,
|
|
},
|
|
});
|
|
});
|