mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Merge dev into update-oauth-docs
This commit is contained in:
commit
7b4e49dc28
@ -1597,7 +1597,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
|
||||
return res;
|
||||
}
|
||||
|
||||
async signInWithOAuth(provider: ProviderType) {
|
||||
async signInWithOAuth(provider: ProviderType, options?: { returnTo?: string }) {
|
||||
if (typeof window === "undefined") {
|
||||
throw new Error("signInWithOAuth can currently only be called in a browser environment");
|
||||
}
|
||||
@ -1608,7 +1608,7 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
|
||||
this._interface,
|
||||
{
|
||||
provider,
|
||||
redirectUrl: this.urls.oauthCallback,
|
||||
redirectUrl: options?.returnTo ?? this.urls.oauthCallback,
|
||||
errorRedirectUrl: this.urls.error,
|
||||
providerScope: this._oauthScopesOnSignIn[provider]?.join(" "),
|
||||
},
|
||||
|
||||
@ -38,7 +38,7 @@ export type StackClientApp<HasTokenStore extends boolean = boolean, ProjectId ex
|
||||
|
||||
readonly urls: Readonly<HandlerUrls>,
|
||||
|
||||
signInWithOAuth(provider: string): Promise<void>,
|
||||
signInWithOAuth(provider: string, options?: { returnTo?: string }): Promise<void>,
|
||||
signInWithCredential(options: { email: string, password: string, noRedirect?: boolean }): Promise<Result<undefined, KnownErrors["EmailPasswordMismatch"] | KnownErrors["InvalidTotpCode"]>>,
|
||||
signUpWithCredential(options: { email: string, password: string, noRedirect?: boolean, verificationCallbackUrl?: string }): Promise<Result<undefined, KnownErrors["UserWithEmailAlreadyExists"] | KnownErrors["PasswordRequirementsNotMet"]>>,
|
||||
signInWithPasskey(): Promise<Result<undefined, KnownErrors["PasskeyAuthenticationFailed"]| KnownErrors["InvalidTotpCode"] | KnownErrors["PasskeyWebAuthnError"]>>,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user