feat: signin with microsoft (#1998)

This commit is contained in:
Ephraim Duncan
2025-10-22 01:05:11 +00:00
committed by GitHub
parent 49b792503f
commit 4a3859ec60
13 changed files with 181 additions and 10 deletions

View File

@ -222,6 +222,22 @@ export class AuthClient {
},
};
public microsoft = {
signIn: async ({ redirectPath }: { redirectPath?: string } = {}) => {
const response = await this.client['oauth'].authorize.microsoft.$post({
json: { redirectPath },
});
await this.handleError(response);
const data = await response.json();
if (data.redirectUrl) {
window.location.href = data.redirectUrl;
}
},
};
public oidc = {
signIn: async ({ redirectPath }: { redirectPath?: string } = {}) => {
const response = await this.client['oauth'].authorize.oidc.$post({ json: { redirectPath } });