Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the prefix in .env and readme #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ENOKI_PUB_KEY=
GOOGLE_CLIENT_ID=
NEXT_PUBLIC_ENOKI_PUB_KEY=
NEXT_PUBLIC_GOOGLE_CLIENT_ID=
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ You will need to set up a Google Auth API key to use the Google Sign-In feature
![Create OAuth client ID](images/create-credential.png)

3. Select `Web application` as the application type.
4. Add `http://localhost:3000/` to the `Authorized redirect URIs`.
4. Add http://localhost:3000/ to the Authorized redirect URIs. For this project, also add http://localhost:3000/auth, otherwise Google will return a 400 error: redirect_uri_mismatch.

Your setup should look something like this:
![OAuth setup](images/authorized-url.png)
Expand Down
2 changes: 1 addition & 1 deletion app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function RootLayout({
return (
<html lang="en">
<SuiClientProvider networks={networkConfig} defaultNetwork="testnet">
<EnokiFlowProvider apiKey={process.env.ENOKI_PUB_KEY!}>
<EnokiFlowProvider apiKey={process.env.NEXT_PUBLIC_ENOKI_PUB_KEY!}>
<body className={inter.className}>{children}</body>
<Analytics />
<Toaster closeButton />
Expand Down
2 changes: 1 addition & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default function Page() {
const promise = async () => {
window.location.href = await enokiFlow.createAuthorizationURL({
provider: "google",
clientId: process.env.GOOGLE_CLIENT_ID!,
clientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID!,
redirectUrl: `${window.location.origin}/auth`,
network: "testnet",
});
Expand Down