mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
made displayName validation optional in oauth
This commit is contained in:
parent
f5183a3920
commit
419dfae590
@ -1,5 +1,5 @@
|
||||
import { Issuer, generators, CallbackParamsType, Client, TokenSet } from "openid-client";
|
||||
import { OAuthUserInfo, validateUserInfo } from "./utils";
|
||||
import { OAuthUserInfo } from "./utils";
|
||||
|
||||
export abstract class OAuthBaseProvider {
|
||||
issuer: Issuer;
|
||||
|
||||
@ -2,7 +2,7 @@ import * as yup from 'yup';
|
||||
|
||||
export interface OAuthUserInfo {
|
||||
accountId: string,
|
||||
displayName: string,
|
||||
displayName?: string,
|
||||
email: string,
|
||||
profileImageUrl?: string,
|
||||
accessToken?: string,
|
||||
@ -11,7 +11,7 @@ export interface OAuthUserInfo {
|
||||
|
||||
const OAuthUserInfoSchema = yup.object().shape({
|
||||
accountId: yup.string().required(),
|
||||
displayName: yup.string().required(),
|
||||
displayName: yup.string(),
|
||||
email: yup.string().required(),
|
||||
profileImageUrl: yup.string().default(undefined),
|
||||
accessToken: yup.string().default(undefined),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user