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

feat(provider): add Dropbox #1756

Merged
merged 16 commits into from
May 5, 2021

Conversation

manishrc
Copy link
Contributor

What:

  • Add dropbox provider
  • Add documentation for dropbox

How:

Add provider similar to other providers.
Since dropbox does not support GET for Profile, conditionally used POST if provider is Dropbox.

Checklist:

  • Documentation
  • Tests N/A
  • Ready to be merged

@vercel
Copy link

vercel bot commented Apr 18, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nextauthjs/next-auth/4DxPvd7Ko8wGXgCJY3S44Puvvvrx
✅ Preview: https://next-auth-git-fork-manishrc-feat-add-provider-dropb-f4148b.vercel.app

@vercel vercel bot temporarily deployed to Preview April 18, 2021 04:58 Inactive
@github-actions github-actions bot added core Refers to `@auth/core` docs Relates to documentation providers labels Apr 18, 2021
@vercel vercel bot temporarily deployed to Preview April 18, 2021 04:59 Inactive
Copy link
Member

@balazsorban44 balazsorban44 left a comment

Choose a reason for hiding this comment

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

Just a few small comments, otherwise looking good! So I assume you have tested these all locally, right? Currently, we don't have any robust test setup, so we kind of rely on the ones implementing providers that they test it out before committing. 🙈

@balazsorban44 balazsorban44 changed the title Add provider: Dropbox feat(provider): add Dropbox Apr 19, 2021
@michalbundyra
Copy link
Contributor

michalbundyra commented Apr 23, 2021

Just to note here - we need to add the new provider also to types -

export type OAuthProviderType =
(per #1773)
Thanks! :)

@vercel vercel bot temporarily deployed to Preview April 29, 2021 12:11 Inactive
@vercel vercel bot temporarily deployed to Preview April 29, 2021 12:12 Inactive
@vercel vercel bot temporarily deployed to Preview April 29, 2021 12:15 Inactive
@vercel vercel bot temporarily deployed to Preview April 29, 2021 12:16 Inactive
@manishrc manishrc requested a review from 0ubbe as a code owner April 29, 2021 12:19
@vercel vercel bot temporarily deployed to Preview April 29, 2021 12:19 Inactive
@github-actions github-actions bot added the TypeScript Issues relating to TypeScript label Apr 29, 2021
@vercel vercel bot temporarily deployed to Preview April 29, 2021 12:33 Inactive
@manishrc
Copy link
Contributor Author

manishrc commented Apr 29, 2021

UPDATE: Looks like it was a problem with npm link after the nextjs app was moved to its own folder.
Tested and this now works.

I've made all of the suggested changes. But I'm now seeing the below error after merging main to this branch:

image

Unhandled Runtime Error

TypeError: Cannot use 'in' operator to search for 'undefined' in null

next-auth/client/index.js (166:16) @ _callee7$

  164 | 
  165 |   // Redirect to sign in page if no valid provider specified
> 166 |   if (!(provider in providers)) {
      |                ^
  167 |     // If Provider not recognized, redirect to sign in page
  168 |     window.location = `${baseUrl}/signin?callbackUrl=${encodeURIComponent(callbackUrl)}`
  169 |     return

Call Stack

tryCatch
node_modules/regenerator-runtime/runtime.js (63:14)
Generator.invoke [as _invoke]
node_modules/regenerator-runtime/runtime.js (293:0)
Generator.eval [as next]
node_modules/regenerator-runtime/runtime.js (118:0)
asyncGeneratorStep
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js (3:0)
_next
node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js (25:0)

@manishrc manishrc requested a review from balazsorban44 April 29, 2021 18:00
@vercel vercel bot temporarily deployed to Preview May 4, 2021 16:01 Inactive
@vercel vercel bot temporarily deployed to Preview May 5, 2021 04:09 Inactive
@vercel vercel bot temporarily deployed to Preview May 5, 2021 17:32 Inactive
@balazsorban44 balazsorban44 merged commit 332e237 into nextauthjs:main May 5, 2021
mnphpexpert added a commit to mnphpexpert/next-auth that referenced this pull request Sep 2, 2024
Co-authored-by: Balázs Orbán <[email protected]>
Co-authored-by: Adam Bergman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` docs Relates to documentation providers TypeScript Issues relating to TypeScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants