Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add loose auto complete to string literals where applicable #966

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class AuthError extends Error {
* before a response is received will not have one present. In that
* case {@link #status} will also be undefined.
*/
code: ErrorCode | string | undefined
code: ErrorCode | (string & {}) | undefined

/** HTTP status code that caused the error. */
status: number | undefined
Expand Down
8 changes: 4 additions & 4 deletions src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export type GoTrueClientOptions = {
hasCustomAuthorizationHeader?: boolean
}

export type WeakPasswordReasons = 'length' | 'characters' | 'pwned' | string
export type WeakPasswordReasons = 'length' | 'characters' | 'pwned' | (string & {})
export type WeakPassword = {
reasons: WeakPasswordReasons[]
message: string
Expand Down Expand Up @@ -265,7 +265,7 @@ export interface Session {
*/
export interface AMREntry {
/** Authentication method name. */
method: 'password' | 'otp' | 'oauth' | 'mfa/totp' | string
method: 'password' | 'otp' | 'oauth' | 'mfa/totp' | (string & {})

/**
* Timestamp when the method was successfully used. Represents number of
Expand Down Expand Up @@ -304,7 +304,7 @@ export interface Factor {
/**
* Type of factor. `totp` and `phone` supported with this version
*/
factor_type: 'totp' | 'phone' | string
factor_type: 'totp' | 'phone' | (string & {})

/** Factor's status. */
status: 'verified' | 'unverified'
Expand Down Expand Up @@ -598,7 +598,7 @@ export type SignInWithOAuthCredentials = {

export type SignInWithIdTokenCredentials = {
/** Provider name or OIDC `iss` value identifying which provider should be used to verify the provided token. Supported names: `google`, `apple`, `azure`, `facebook`, `kakao`, `keycloak` (deprecated). */
provider: 'google' | 'apple' | 'azure' | 'facebook' | 'kakao' | string
provider: 'google' | 'apple' | 'azure' | 'facebook' | 'kakao' | (string & {})
/** OIDC ID token issued by the specified provider. The `iss` claim in the ID token must match the supplied provider. Some ID tokens contain an `at_hash` which require that you provide an `access_token` value to be accepted properly. If the token contains a `nonce` claim you must supply the nonce used to obtain the ID token. */
token: string
/** If the ID token contains an `at_hash` claim, then the hash of this value is compared to the value in the ID token. */
Expand Down
Loading