Skip to content

feat(provider): add Dropbox#1756

Merged
balazsorban44 merged 16 commits into
nextauthjs:mainfrom
manishrc:feat/add-provider-dropbox
May 5, 2021
Merged

feat(provider): add Dropbox#1756
balazsorban44 merged 16 commits into
nextauthjs:mainfrom
manishrc:feat/add-provider-dropbox

Conversation

@manishrc

Copy link
Copy Markdown
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

vercel Bot commented Apr 18, 2021

Copy link
Copy Markdown

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

@balazsorban44 balazsorban44 left a comment

Copy link
Copy Markdown
Contributor

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. 🙈

Comment thread src/server/lib/oauth/client.js
Comment thread src/providers/dropbox.js Outdated
@balazsorban44 balazsorban44 changed the title Add provider: Dropbox feat(provider): add Dropbox Apr 19, 2021
Comment thread src/providers/dropbox.js Outdated
Comment thread src/providers/index.js Outdated
@michalbundyra

michalbundyra commented Apr 23, 2021

Copy link
Copy Markdown
Contributor

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

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

Comment thread src/providers/dropbox.js Outdated
Comment thread src/providers/dropbox.js Outdated
@vercel vercel Bot temporarily deployed to Preview April 29, 2021 12:11 Inactive
Co-authored-by: Balázs Orbán <info@balazsorban.com>
@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

manishrc commented Apr 29, 2021

Copy link
Copy Markdown
Contributor Author

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
Comment thread src/providers/dropbox.js Outdated
Co-authored-by: Adam Bergman <adam@fransvilhelm.com>
@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 <info@balazsorban.com>
Co-authored-by: Adam Bergman <adam@fransvilhelm.com>
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