mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Fix STACK-SERVER-Q
This commit is contained in:
parent
1f6ebac9b3
commit
8dae0fd60c
@ -1,21 +1,14 @@
|
||||
import * as yup from 'yup';
|
||||
|
||||
export interface OAuthUserInfo {
|
||||
accountId: string,
|
||||
displayName?: string,
|
||||
email: string,
|
||||
profileImageUrl?: string,
|
||||
accessToken?: string,
|
||||
refreshToken?: string,
|
||||
}
|
||||
export type OAuthUserInfo = yup.InferType<typeof OAuthUserInfoSchema>;
|
||||
|
||||
const OAuthUserInfoSchema = yup.object().shape({
|
||||
accountId: yup.string().required(),
|
||||
displayName: yup.string(),
|
||||
displayName: yup.string().nullable().default(null),
|
||||
email: yup.string().required(),
|
||||
profileImageUrl: yup.string().default(undefined),
|
||||
accessToken: yup.string().default(undefined),
|
||||
refreshToken: yup.string().default(undefined),
|
||||
profileImageUrl: yup.string().nullable().default(null),
|
||||
accessToken: yup.string().nullable().default(null),
|
||||
refreshToken: yup.string().nullable().default(null),
|
||||
});
|
||||
|
||||
export function validateUserInfo(userInfo: any): OAuthUserInfo {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user