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

Dev mode: External provider login redirects to main site. #86

Open
tech4him1 opened this issue Nov 2, 2017 · 18 comments
Open

Dev mode: External provider login redirects to main site. #86

tech4him1 opened this issue Nov 2, 2017 · 18 comments
Labels
feat/identity never_stale type: feature code contributing to the implementation of a feature and/or user facing functionality

Comments

@tech4him1
Copy link
Contributor

If I am working on a localhost site, and I try to login with an external OAuth provider, I am redirected back to the main site (the one with Identity), instead of my localhost dev site.

@erquhart
Copy link
Contributor

erquhart commented Nov 7, 2017

Thanks for adding this @tech4him1, been hearing more about it lately.

@KrishnaPG
Copy link

Is there anyway (perhaps on the Netlify identity settings UI) to specify the redirection URL?

@marcobiedermann
Copy link

Same here. I setup my site using Gatsby and netlify-cms. I deployed everything to netlify and enabled identity services. When trying this locally using "http://localhost:9000" in the site URL from admin prompt I get this:

Also tried to copy my remote settings file locally but this does not seam to work either.

@tech4him1
Copy link
Contributor Author

@marcobiedermann No, that is a different issue. When it asks you for the site URL, you need to enter the actual deployed site URL, so that it can access your Identity instance (your users, etc.).

@marcobiedermann
Copy link

@tech4him1 I thought so but after entering my live site URL I get redirected to the live site instead of localhost (which is the right behaviour in my opinion).
Still I don't know how to enter the cms backend panel from localhost.

@tech4him1
Copy link
Contributor Author

tech4him1 commented Dec 20, 2017

@marcobiedermann The redirection bug is what this issue is about. The bug only happens when you try to log in with an external provider (GitHub, Google, etc.). If you log in with a email/password it should not redirect. If you need any specifc help setting it up you can ask in the Gitter: https://gitter.im/netlify/

@erquhart
Copy link
Contributor

@bcomnes can you provide a status update on this?

@bcomnes
Copy link
Contributor

bcomnes commented Dec 20, 2017

We just started work on this, so hopefully soon!

@tech4him1
Copy link
Contributor Author

@bcomnes If I understand correctly, netlify/gotrue#132 fixed this, but it doesn't seem to be deployed on Netlify's instance yet?

@bcomnes
Copy link
Contributor

bcomnes commented Jan 9, 2018

We have a fix in the code, I don't have an ETA yet but I'm eager to get it deployed.

@jsamr
Copy link

jsamr commented Mar 30, 2018

@bcomnes any updates ?

@bcomnes bcomnes added bug and removed bug labels Apr 23, 2018
@bcomnes
Copy link
Contributor

bcomnes commented Apr 26, 2018

I confirmed this today as correct behavior that isn't changing soon.

What we can do in the meantime:

  • Provider logins won't work in devmode (we either disable them or include devmode only messaging that they will redirect to the live site)
  • Email/password login is always enabled in devmode, because its the only method that does not require a redirect. When we support provider only logins, the email/password login will only show in devmode, so you can log in.

See #100

I would, one day, like to see provider logins work in devmode, so I'm leaving this open until we make a final decision on the matter.

@jlengstorf jlengstorf added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jul 30, 2020
@laurajodz
Copy link

FYI Devex owns this repo but doesn't use GitHub project boards like Eng does. So there is no project to add to.

(https://netlify.slack.com/archives/CCC1HDWQY/p1600806294044200)

@signalkuppe
Copy link

+1

@andrewgremlich
Copy link

How's the progress on this? It seems like it still exists with the app that I'm working on.

@contendaClara
Copy link

any updates? I get this behavior though I don't use an external OAuth provider

@khylias
Copy link

khylias commented May 24, 2022

It is still not possible to authenticate on a development environment with this widget. After connecting to the provider, for example Github, we are always redirected to the production url. But it is on the development environment that we need to be redirected to get the access_token.

This has nothing to do with Netlify CMS.

Do you intend to investigate the problem?

@filipesperandio
Copy link

It is a little sad that 7 years later and this is still an issue.

Using DecapCMS, if we flip the git-gateway option + netlify-identity to use the github backend instead, local dev works like a charm. I believe the auth process just uses a window popup instead so it can avoid going to the prod website.
We could use a similar approach when using the external providers for local dev to also work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/identity never_stale type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

No branches or pull requests