-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 instructions for auth with Netlify Identity and Git Gateway #600
Comments
I'd be very happy to help on this, on an ongoing basis, having spent some time this morning trying to get my head around the dependencies between GitHub, the SPA and In particular, I think we can make the docs more explicit about the need for and the nature of any dependencies on Netlify-owned servers (i.e. As a concrete example, in the new Authentication section, we should make it clear that when used in a local dev environment, My sense is as the |
Thanks, @eamonnbell! In the interest of getting the simplest parts working before tackling the more involved ones, I'm planning to put up a PR for the test-drive changes today. Then I'll do one for quick-start, probably tomorrow. When those are done and people can see a clearer view of how the git-gateway backend works, we can talk about how to structure the new Authentication page. Let me know if you'd like to jump in on any of these before I get started (in a few hours). |
Sorry for my late reply, I hope I didn't hold up anything. If you haven't started, I could jump in on the "test-drive" changes and have a PR for you to have a look at by tomorrow AM. Or, just @ me when the Authentication page is ready for discussion and we can go from there. |
@eamonnbell no problem! PR #626 referenced above ^ has my update to the Test Drive doc. I'd love it if you could take a look. I'm thinking I'll start next on the Quick Start, but it occurs to me that if it gets published before the Custom Authentication page gets updated, there won't be any docs for the github backend anymore, so I guess both pages will have to be updated together. |
As we re-structure the docs as outlined in #598, I'm using the remaining check points of this issue to track improvements to the authentication and backends documentation. Here's the general page outline from #598: Backends & authentication
I've called for full instructions for Netlify-enabled backends, and external links for more DIY options, but if there are contributors who would like to write full instructions for those, we can do that. |
I just followed the documentation and it works great, except for the redirect from the index page, instead a modal is displayed to confirm I'm logged in: Note: as there's a redirection to latest package version you could simply write |
@DirtyF I'm having trouble getting this working as well. Seems like the init event is never firing. Did you find a solution? |
@AustinGreen nope, functions still return if (window.netlifyIdentity) {
window.netlifyIdentity.on("init", user => {
if (!user) {
window.netlifyIdentity.on("login", () => {
document.location.href = "/admin/";
});
}
});
}
undefined
window.netlifyIdentity
Object { on: on(), open: open(), close: close(), currentUser: currentUser(), logout: logout(), gotrue: Getter, init: init() }
window.netlifyIdentity.on("init", user => {})
undefined
window.netlifyIdentity.on("login", () => {})
undefined |
@DirtyF source issue here: netlify/netlify-identity-widget#86 |
Auth issues should be addressed as of 0.7.6. |
#751 Finished this out. |
In the current docs outline, this requires changes in a few places:
/docs/intro.md
Change to a Git Gateway backend in the sampleconfig.yml
? (I'm a bit torn on this one, but leaning towards changing.)/docs/test-drive.md (see PR #626)
https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/one-click-hugo-cms&stack=cms
/docs/quick-start.md
index.html
file to pull the latest beta version (@>0.5.0-beta.1
), and make a note that this setup requires use of the beta versiongithub
backend withgit-gateway
(see the test drive repo config for an example)/docs/custom-authentication.md (see PR #751)
github
backend with Netlify auth as well as external providersgit-gateway
with the Netlify-managed Git Gateway/Identity setup, as well as a reference to diy options using the open source Git Gateway and GoTrue or another JWT Oauth provider. (This does not need to be a full guide at this point, but an indicator that it can be done, with links.)I think that covers everything for now (until we restructure the docs as described in #598). Feel free to add anything I'm missing.
The text was updated successfully, but these errors were encountered: