fix(workshop): harden deployment and deep links (#6542)
This commit is contained in:
1 parent
557ebe0a2f
commit
8ab3f136b8
9 files changed
+68
-5
No files matched your search
@@ -23,5 +23,12 @@ const github = users.oauth2?.providers?.find((provider) => provider.name === "gi
|
||||
if (!users.oauth2?.enabled || github?.clientId !== expectedClientId) {
|
||||
throw new Error(`GitHub OAuth was not synchronized for ${expectedClientId}`);
|
||||
}
|
||||
if (
|
||||
users.oauth2?.mappedFields?.username !== "displayName" ||
|
||||
users.oauth2?.mappedFields?.name ||
|
||||
users.oauth2?.mappedFields?.avatarURL !== "avatarUrl"
|
||||
) {
|
||||
throw new Error(`GitHub OAuth field mapping was not synchronized: ${JSON.stringify(users.oauth2?.mappedFields)}`);
|
||||
}
|
||||
|
||||
console.log(`Workshop OAuth synchronization passed for ${expectedClientId}`);
|
||||
@@ -13,7 +13,7 @@ const identity = deriveGithubIdentity(
|
||||
"record123456",
|
||||
);
|
||||
if (
|
||||
identity.displayName !== "Octo Cat" ||
|
||||
identity.displayName !== "octocat" ||
|
||||
identity.githubUsername !== "octocat" ||
|
||||
identity.githubProfileUrl !== "https://github.com/octocat" ||
|
||||
identity.avatarUrl !== "https://avatars.githubusercontent.com/u/1?v=4"
|
||||
@@ -35,7 +35,7 @@ const rawFallback = deriveGithubIdentity(
|
||||
"record123456",
|
||||
);
|
||||
if (
|
||||
rawFallback.displayName !== "Raw User" ||
|
||||
rawFallback.displayName !== "raw-user" ||
|
||||
rawFallback.githubUsername !== "raw-user" ||
|
||||
rawFallback.githubProfileUrl !== "https://github.com/raw-user"
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user