Automatically infer user language when signing in via Google (#6679)
This commit is contained in:
@@ -20,6 +20,8 @@ type Props = {
|
||||
email: string;
|
||||
/** The public url of an image representing the user */
|
||||
avatarUrl?: string | null;
|
||||
/** The language of the user, if known */
|
||||
language?: string;
|
||||
};
|
||||
/** Details of the team the user is logging into */
|
||||
team: {
|
||||
@@ -129,6 +131,7 @@ async function accountProvisioner({
|
||||
result = await userProvisioner({
|
||||
name: userParams.name,
|
||||
email: userParams.email,
|
||||
language: userParams.language,
|
||||
isAdmin: isNewTeam || undefined,
|
||||
avatarUrl: userParams.avatarUrl,
|
||||
teamId: team.id,
|
||||
|
||||
@@ -20,6 +20,8 @@ type Props = {
|
||||
name: string;
|
||||
/** The email address of the user */
|
||||
email: string;
|
||||
/** The language of the user, if known */
|
||||
language?: string;
|
||||
/** Provision the new user as an administrator */
|
||||
isAdmin?: boolean;
|
||||
/** The public url of an image representing the user */
|
||||
@@ -51,6 +53,7 @@ export default async function userProvisioner({
|
||||
name,
|
||||
email,
|
||||
isAdmin,
|
||||
language,
|
||||
avatarUrl,
|
||||
teamId,
|
||||
authentication,
|
||||
@@ -233,6 +236,7 @@ export default async function userProvisioner({
|
||||
{
|
||||
name,
|
||||
email,
|
||||
language,
|
||||
isAdmin: typeof isAdmin === "boolean" && isAdmin,
|
||||
isViewer: isAdmin === true ? false : defaultUserRole === "viewer",
|
||||
teamId,
|
||||
|
||||
Reference in New Issue
Block a user