-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
feat(unlock-app): NextAuth components #14025
Conversation
screenshots please? |
unlock-app/package.json
Outdated
@@ -79,6 +81,7 @@ | |||
"typescript": "5.4.5", | |||
"unified": "11.0.4", | |||
"validator": "13.12.0", | |||
"waas-sdk-ethers": "https://api.developer.coinbase.com/waas/consumer/1994648a1fa8a282f1c3ca917a0379f1f79fbb06/waas-sdk-ethers/waas-sdk-ethers-3.0.0.tgz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we said you will use our own library here?
import ConnectingWaas from '../interface/connect/ConnectingWaas' | ||
import { AppLayout } from '../interface/layouts/AppLayout' | ||
|
||
export const ConnectingContent = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you rather try to use the same layout as the "login" state?
|
||
useEffect(() => { | ||
if (!timeoutRef.current) { | ||
timeoutRef.current = setTimeout(async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of the timeout here? I assume it should never happen, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If connecting takes to much time, we cancel the sign-in process here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that happening?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a decent start! Please rebase and implement the changes!
}, | ||
]} | ||
actions={ | ||
showConnectButton |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would not need to change any of these if you use the same layout for the ConnectingContent
view, which I think is what you should do.
unlock-app/src/config/app.ts
Outdated
@@ -52,6 +52,8 @@ export const config = { | |||
ethPassApiKey: 'sk_live_h0pHRAZ2E6WTkNIrXvEzbEQN39Ftrp1p', | |||
walletConnectApiKey: '1535029cc7500ace23802e2e990c58d7', // https://cloud.walletconnect.com/app/project?uuid=7920be27-1e19-43a8-8f7d-cafbb00d4b80 | |||
googleMapsApiKey: 'AIzaSyDp0Y4yQn6WtYEFEgRZg52EiDSgLwxzVMA', | |||
googleClientId: process.env.GOOGLE_CLIENT_ID, // https://console.cloud.google.com/apis/dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should porbably use the NEXT_PUBLIC_ prefix. Please confirm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or is it secret as well?
* @param {*} token | ||
* @returns {Promise<*>} | ||
*/ | ||
async getUserWaasUuid(emailAddress: string, provider: string, token: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should npt be in this file. Please add the API calls to openapi.yaml (inside of unlockjs) and then use the generated client.
<span className="w-full max-w-lg text-base text-gray-700"> | ||
We are connecting to the Unlock Protocol, please be patient and do not | ||
refresh the page. | ||
</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<span className="w-full max-w-lg text-base text-gray-700"> | |
We are connecting to the Unlock Protocol, please be patient and do not | |
refresh the page. | |
</span> | |
<span className="w-full max-w-lg text-base text-gray-700"> | |
Signing in... | |
</span> |
unlock-app/src/config/app.ts
Outdated
@@ -52,6 +52,9 @@ export const config = { | |||
ethPassApiKey: 'sk_live_h0pHRAZ2E6WTkNIrXvEzbEQN39Ftrp1p', | |||
walletConnectApiKey: '1535029cc7500ace23802e2e990c58d7', // https://cloud.walletconnect.com/app/project?uuid=7920be27-1e19-43a8-8f7d-cafbb00d4b80 | |||
googleMapsApiKey: 'AIzaSyDp0Y4yQn6WtYEFEgRZg52EiDSgLwxzVMA', | |||
googleClientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID, // https://console.cloud.google.com/apis/dashboard | |||
googleClientSecret: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET, // https://console.cloud.google.com/apis/dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
googleClientSecret: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET, // https://console.cloud.google.com/apis/dashboard | |
googleClientSecret: process.env.GOOGLE_CLIENT_SECRET, // https://console.cloud.google.com/apis/dashboard |
…lock into next-auth-front-start
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One final change
.github/workflows/master.yml
Outdated
@@ -82,7 +82,7 @@ jobs: | |||
UNLOCK_APP_VERCEL_STAGING_VERCEL_ORG_ID: op://secrets/vercel/org-id | |||
UNLOCK_APP_VERCEL_STAGING_VERCEL_TOKEN: op://secrets/vercel/deployment-token | |||
UNLOCK_APP_VERCEL_STAGING_NEXT_PUBLIC_BASE64_WEDLOCKS_PUBLIC_KEY: op://secrets/wedlocks/public-key | |||
UNLOCK_APP_VERCEL_STAGING_NEXTHAUTH_URL: 'https://unlock-protocol.com' | |||
UNLOCK_APP_VERCEL_STAGING_NEXTAUTH_URL: 'https://unlock-protocol.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be more accurate?
UNLOCK_APP_VERCEL_STAGING_NEXTAUTH_URL: 'https://unlock-protocol.com' | |
UNLOCK_APP_VERCEL_STAGING_NEXTAUTH_URL: 'https://staging-app.unlock-protocol.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please add to the pull-request.yml
and production
workflows!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure we set the env correctly!
.github/actions/vercel/action.yml
Outdated
@@ -23,6 +23,7 @@ secrets: | |||
NEXT_PUBLIC_ETHPASS_KEY: | |||
required: false | |||
env: | |||
NEXTAUTH_URL: 'https://unlock-protocol.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is porbabvly not correct?
It needs to be https://app.unlock-protocol.com or https://staging-app.unlock-protocol.com but please pass the value from the workflow that calls this action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not correct
.github/workflows/pull-request.yml
Outdated
@@ -85,18 +21,9 @@ jobs: | |||
UNLOCK_APP_VERCEL_STAGING_VERCEL_ORG_ID: op://secrets/vercel/org-id | |||
UNLOCK_APP_VERCEL_STAGING_VERCEL_TOKEN: op://secrets/vercel/deployment-token | |||
UNLOCK_APP_VERCEL_STAGING_NEXT_PUBLIC_BASE64_WEDLOCKS_PUBLIC_KEY: op://secrets/wedlocks/public-key | |||
UNLOCK_APP_VERCEL_STAGING_GOOGLE_CLIENT_SECRET: op://secrets/google/staging-secret | |||
UNLOCK_APP_VERCEL_STAGING_GOOGLE_CLIENT_SECRET: op://secrets/google/staging-secret | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there an extra space here?
.github/workflows/production.yml
Outdated
- uses: ./.github/actions/vercel | ||
with: | ||
service: unlock-app | ||
target-env: prod | ||
env: | ||
UNLOCK_APP_VERCEL_STAGING_NEXTAUTH_URL: 'https://app.unlock-protocol.com' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This CANNOT be STAGING. Staging is for Master.
Thi needs to be UNLOCK_APP_VERCEL_PROD_...
Description
This PR aims to bring new components required for NextAuth without any connecting logic
Issues
Fixes #
Refs #
Checklist:
Release Note Draft Snippet