Skip to content

feat: Include basePath property in NEXTAUTH_URL when present in config #1336

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

Merged
merged 4 commits into from
May 2, 2022

Conversation

ericapisani
Copy link

@ericapisani ericapisani commented May 2, 2022

Summary

This was missed in the initial implementation of adding out of the box NextAuth support (see #1242 ), but is something that is needed when the basePath property exists within the next.config.js file. Related docs on NextAuth can be found here

Test plan

  1. Visit the Deploy Preview here

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

trash_panda

Standard checks:

  • Check the Deploy Preview's Demo site for your PR's functionality

🧪 Once merged, make sure to update the version if needed and that it was published correctly.

@ericapisani ericapisani self-assigned this May 2, 2022
@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/6270035d2737b50008930f7b
😎 Deploy Preview https://deploy-preview-1336--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label May 2, 2022
@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/6270035dc404870009654cc3
😎 Deploy Preview https://deploy-preview-1336--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/6270035ddffb650009b04f3c
😎 Deploy Preview https://deploy-preview-1336--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for next-plugin-edge-middleware canceled.

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/6270035d3b5ec70008a1e62c

@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for next-plugin-rsc-demo canceled.

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-rsc-demo/deploys/6270035d150ff300087c5e83

@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/6270035d8eeb610008eb0f91
😎 Deploy Preview https://deploy-preview-1336--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/6270035da62f49000858347d
😎 Deploy Preview https://deploy-preview-1336--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented May 2, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit f0f090d
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/6270035d3c8372000cdc67c7
😎 Deploy Preview https://deploy-preview-1336--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cypress
Copy link

cypress bot commented May 2, 2022



Test summary

7 0 0 0


Run details

Project netlify-plugin-nextjs-static-demo
Status Passed
Commit 443a9f8 ℹ️
Started May 2, 2022 4:17 PM
Ended May 2, 2022 4:18 PM
Duration 01:13 💡
OS Linux Ubuntu - 20.04
Browser Chrome 100

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented May 2, 2022



Test summary

22 0 0 0


Run details

Project netlify-plugin-nextjs-default-demo
Status Passed
Commit 443a9f8 ℹ️
Started May 2, 2022 4:17 PM
Ended May 2, 2022 4:19 PM
Duration 01:39 💡
OS Linux Ubuntu - 20.04
Browser Chrome 100

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented May 2, 2022



Test summary

2 0 0 0


Run details

Project netlify-plugin-nextjs-nx-monorepo-demo
Status Passed
Commit 443a9f8 ℹ️
Started May 2, 2022 4:18 PM
Ended May 2, 2022 4:19 PM
Duration 01:09 💡
OS Linux Ubuntu - 20.04
Browser Chrome 100

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@ericapisani ericapisani requested a review from a team May 2, 2022 15:13
@ericapisani ericapisani marked this pull request as ready for review May 2, 2022 15:13
@nickytonline
Copy link

CleanShot 2022-05-02 at 11 54 41

@ericapisani, the demo site exited early during build.

11:05:54 AM: Build ready to start
11:06:00 AM: build-image version: d2c6dbeac570350a387d832f64bc980dc964ad65 (focal)
11:06:00 AM: build-image tag: v4.8.0
11:06:00 AM: buildbot version: a018caed2ab46726023e1532e0d3214727318b1c
11:06:00 AM: Fetching cached dependencies
11:06:01 AM: Starting to download cache of 239.1MB
11:06:03 AM: Finished downloading cache in 2.728393725s
11:06:03 AM: Starting to extract cache
11:06:07 AM: Finished extracting cache in 4.257576514s
11:06:07 AM: Finished fetching cache in 7.005896418s
11:06:07 AM: Starting to prepare the repo for build
11:06:08 AM: Preparing Git Reference pull/1336/head
11:06:08 AM: Parsing package.json dependencies
11:06:09 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'demos/next-auth/.next' versus '.next' in the Netlify UI
11:06:09 AM: Different build command detected, going to use the one specified in the Netlify configuration file: 'next build' versus 'npm run build' in the Netlify UI
11:06:09 AM: Detected ignore command in Netlify configuration file. Proceeding with the specified command: 'git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF . ../../plugin'
11:06:09 AM: User-specified ignore command returned exit code 0. Returning early from build.
11:06:09 AM: Creating deploy upload records
11:06:09 AM: Failed during stage 'checking build content for changes': Canceled build due to no content change
11:06:09 AM: Finished processing build request in 8.965846734s

@ericapisani
Copy link
Author

@nickytonline Not quite sure what happened but I'm seeing a successful build message 🤔

Screen Shot 2022-05-02 at 12 18 42 PM

This is also the most recent build log on the Netlify UI side so maybe it was just an initial hiccup and merging the main branch into this branch was what it needed to sort itself out

Screen Shot 2022-05-02 at 12 21 26 PM

@sarahetter
Copy link

I'm seeing the same thing as Erica, fwiw

@nickytonline
Copy link

@nickytonline Not quite sure what happened but I'm seeing a successful build message 🤔

Screen Shot 2022-05-02 at 12 18 42 PM

This is also the most recent build log on the Netlify UI side so maybe it was just an initial hiccup and merging the main branch into this branch was what it needed to sort itself out

Screen Shot 2022-05-02 at 12 21 26 PM

Weird, seems all good now. 🙃

Copy link

@nickytonline nickytonline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the demo site locally and it looks good. Same for tests. 🚀

@kodiakhq kodiakhq bot merged commit 346aad1 into main May 2, 2022
@kodiakhq kodiakhq bot deleted the ep/include-basePath-in-nextAuth-url branch May 2, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants