Skip to content

Commit

Permalink
feat: testing section for auth0 e2e in staging (#1377)
Browse files Browse the repository at this point in the history
* feat: testing section for auth0 e2e

* feat: use env for auth testing
  • Loading branch information
RobChangCA authored Feb 24, 2025
1 parent 3adbef8 commit 6c2edde
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/ui-demo/public/images/key.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions examples/ui-demo/src/app/sections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { AuthType } from "@account-kit/react";
import { KnownAuthProvider } from "@account-kit/signer";
import { Config } from "./config";

const isTesting = process.env.NODE_ENV === "test";
const auth0TestingConnection = process.env.NEXT_PUBLIC_AUTH0_TESTING_CONNECTION;
const SocialAuth0Providers = ["twitter", "discord"];

export function getSectionsForConfig(
Expand Down Expand Up @@ -73,5 +75,18 @@ export function getSectionsForConfig(
},
]);
}
if (isTesting && auth0TestingConnection) {
midSection.push({
type: "social",
authProviderId: "auth0",
mode: "popup",
auth0Connection: auth0TestingConnection,
displayName: "Test",
// Re-using twitter logo for testing, will not be seen in production
logoUrl: "/images/key.svg",
logoUrlDark: "/images/key.svg",
scope: "openid profile",
});
}
return sections;
}

0 comments on commit 6c2edde

Please sign in to comment.