More accurate name for google sign in property.

This commit is contained in:
CookieCoder15
2020-10-03 21:04:43 +01:00
committed by Gareth Latty
parent 99e65d352d
commit 811f29a0de
2 changed files with 6 additions and 7 deletions
+5 -6
View File
@@ -55,8 +55,8 @@ const main = async (): Promise<void> => {
config.auth.twitch === undefined
? undefined
: Jwks({
jwksUri: config.auth.twitch.jwk,
});
jwksUri: config.auth.twitch.jwk,
});
const verifyWith = async (
token: string,
@@ -120,7 +120,7 @@ const main = async (): Promise<void> => {
});
const payload = ticket.getPayload();
if (payload !== undefined) {
const { id, name } = await store.findOrCreateUser(
const { id, name } = await store.findOrCreateGoogleUser(
payload.sub,
payload.name
);
@@ -213,9 +213,8 @@ const main = async (): Promise<void> => {
d.author = d.author.name;
return {
content: Json5.stringify(c, undefined, 2),
name: `${d.name.replace(/\s/g, "-")}-${
d.language
}-${Uuid.v4()}.deck.json5`,
name: `${d.name.replace(/\s/g, "-")}-${d.language
}-${Uuid.v4()}.deck.json5`,
};
}),
filename: "backup.zip",
+1 -1
View File
@@ -74,7 +74,7 @@ export class Store {
});
}
public findOrCreateUser: (
public findOrCreateGoogleUser: (
googleId: string,
googleName?: string
) => Promise<User.User> = async (googleId, googleName) =>