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

Add netlify-identity submodule #147

Merged
merged 12 commits into from
Feb 9, 2024
Merged

Add netlify-identity submodule #147

merged 12 commits into from
Feb 9, 2024

Conversation

pleasantone
Copy link
Contributor

@pleasantone pleasantone commented Feb 8, 2024

Website needs to be updated to document this submodule, and the two parameters that may be overridden:

[params.decap_cms._netlify_identity]
admin_path = "/admin/"
js_url = "https://identity.netlify.com/v1/netlify-identity-widget.js"

Left the legacy hooks in place for backwards compatibility.
@pleasantone
Copy link
Contributor Author

Ready for your review and merge @razonyang -- thank you!

pleasantone and others added 3 commits February 8, 2024 17:42
@razonyang
Copy link
Member

Sorry for the delay response, just set up a demo on Netlify to see how it work.

@pleasantone
Copy link
Contributor Author

pleasantone commented Feb 9, 2024 via email

@razonyang
Copy link
Member

No, that code only gets executed in response to the netlify server, which returns to the homepage, and really needs to go to the admin page. Someone who is not editing using the CMS will never know that it’s there

I took a look at the identity widget library docs, that code listend the login event, so it seems that you've a login button on homepage, redirect to /admin after user login?

@pleasantone
Copy link
Contributor Author

pleasantone commented Feb 9, 2024 via email

@razonyang
Copy link
Member

When a user logs in with the Netlify Identity widget, an access token directs to the site homepage. In order to complete the login and get back to the CMS, redirect the user back to the /admin/ path.

I get it, thanks for the references.

@razonyang razonyang merged commit 0e35b70 into hugomods:main Feb 9, 2024
1 check passed
@github-actions github-actions bot mentioned this pull request Feb 9, 2024
@razonyang
Copy link
Member

Merged and drafted releases, thank you so much.

@pleasantone
Copy link
Contributor Author

Thank you, I learned a lot from you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants