-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Troubleshooting oauth client #1285
Comments
I see the CMS version being printed to the console twice, which means two separate CMS instances are being created. That may have something to do with it. |
I've removed the duplicate instance, same result. |
So fundamentally the problem is that the authenticate function in netlify-auth.js is appending '/auth' to base_url. This breaks when the you want the authentication url to be different from the site root. In my example, my base url for authentication is https://www.control-alt-del.org/oauth/{auth|callback} Add a configuration setting 'authentication_base' to the backend config settings, and update the comparisons in handshakeCallback and authorizeCallback to use that instead of base_url. |
I think I'm having this same problem but I can't work out a way around it. I have everything set up exactly, as far as I can tell, like this, other than my Code here: bakerkretzmar/madihaslam My Netlify
The GitHub authentication works, the app gets permission to use my account, and then the authorization popup just sits there. I can see My serverless deploy is working, my parameters and KMS keys are working as far as I can tell, but the CMS itself doesn't seem to know that I've authorized it. I hope this is the right place to post this! Thanks! |
@bakerkretzmar did you managed to get it working? |
@pbrandone nope, but in the meantime they added support for GitLab so I switched to that backend with implicit grant and that's working great. |
It looks like this issue is due to https://github.com/netlify/netlify-cms/blob/master/packages/netlify-cms-lib-auth/src/netlify-auth.js#L44. netlify-cms-lib-auth expects So in @bakerkretzmar's case— netlify-cms-lib-auth will fail to authorize, because You can fix this by replacing the above configuration with
Is there a good reason netlify-cms-lib-auth doesn't simply check against the origin of |
@lukeburns comments on #1294 provide the rationale - tl;dr: we could change it, just need to make sure nothing breaks in the process. |
- Do you want to request a feature or report a bug?
Might be a bug, might be a feature
- What is the current behavior?
While implementing an OAuth auth backend for Github, I'm seeing what might be an issue either with Redux state or inter-window communication.
My code:
https://github.com/marksteele/netlify-serverless-oauth2-backend
The HTML bits are copied from the other implementations (go/python/nodejs), and the HTML output appears to succeed, however the auth window does not close and the app state doesn't update to reflect the successful auth. Might be a bug in my code...
- If the current behavior is a bug, please provide the steps to reproduce.
- What is the expected behavior?
Auth window closes, react app updates with token from auth success.
- Please mention your versions where applicable.
netflify 1.5.0
https://www.control-alt-del.org/admin/
- Please link or paste your
config.yml
below if applicable.https://www.control-alt-del.org/admin/config.yml
The text was updated successfully, but these errors were encountered: