-
-
Notifications
You must be signed in to change notification settings - Fork 239
Default email template doesn’t have /admin (Netlify CMS) #62
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
Comments
Sorry to hear about that! Here are some preliminary thoughts: Indeed Netlify CMS login is a bit finicky, however, from v3 onwards I had implemented a different behavior for those email links. Because, by default, Netlify sends emails like this: example.com/#invite_token but the links should have a URL like this: example.com/admin/#invite_token That is the one issue I recall being very pertinent. Another point: have you tried using SSO? It should be much easier than the username/password workflow? Because as far as I understand, you just haven't set up a password which is why you can't login. |
I actually tried that first but it went through the authorisation process (enter creds into popup Gitlab window) and then went back to the main web page. Going to
The links sent via email don't have the
The issue is there is no way to set a password because it says I haven't confirmed my email. I'm assuming when I do that I'll get a nice box asking me for a password. Netlify seems nice but getting this working within it (my experiences aside, based more on your comments and what I've read in this repo). As an aside, is prose.io an easier proposition (although it doesn't do the hosting)? |
They should. They don’t. That’s the issue with them. Everything must happen within the /admin URLs.
GitHub only though. GitHub does the hosting. |
Is that a cState issue or a Netlify one? The email link that arrives looks like this:
(that's not a real link) so once that resolves to Will also now look at setting up the Gitlab provider.
Ah. No use then sadly. |
Do you have JS on? |
To explain a bit better - I believe I added a JS redirect in v3 for those links without /admin |
I'll give you the long explanation 😄 I have two browsers - Firefox which is locked down with uBlock Origin and uMatrix. That needs JS turned on for sites. That's why I use Chromium as it is straight out of the box so JS is on. That's what I use for this at the moment to make sure I'm ruling out issues such as JS or other 'site parts' that uMatrix will block in Firefox. What I did as copy the link from the email and paste it in Chromium. |
Okay so the JavaScript isn't working. I'll look into getting the Netlify template emails fixed |
Awesome. |
Crap. There’s no way to do this by default. |
Does this not say you can:
So you could have I feel this is too easy and you know it better than I so I'm assuming not? |
relevant bit:
|
sort of yes that + there would be a migration (except this isn't critical functionality but anyway) guide for people on the older versions it's feasible but not a pretty solution which is what I would love to have |
I sent an email to Netlify about this - will implement manual email templates for now |
At least there is a relatively painless workaround. |
Oh, actually Netlify at some point changed the URL hash from I’ve tweaked the JS to reflect this (plus keep the old token hash in case other people use the older versions): if (window.location.hash.match('access_token')) {
document.location.pathname = '/admin';
}
if (window.location.hash.match('invite_token')) {
document.location.pathname = '/admin';
}
if (window.location.hash.match('confirmation_token')) {
document.location.pathname = '/admin';
}
if (window.location.hash.match('email_change_token')) {
document.location.pathname = '/admin';
}
if (window.location.hash.match('recovery_token')) {
document.location.pathname = '/admin';
} I’ve also added the better email templates so there’s two choices now: proactive (if you add many users or are just neat like that) + this automatic JS redirect. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I cannot get access to the
/admin
page through NetlifyReproduction steps
Steps to reproduce the behavior:
#invite_token
in the URLsite/admin
and get theLogin to Netlify
button#recovery_token
after it but again nowehere to set an email.I also triued adding the Gitlab provider but it does the same (without the username and password box).
I tried to setup cState in Netlify about 6 months ago (version 2) and had EXACTLY the same issues and gave up.
I'm not sure where the issue lies. If it were a Netlify issue they'd have fixed it. If this was a cState issue, there would be issues raised about it. So is it me? Perhaps but I've been through this so many times that I'm lost as to what the issue actually is.
Expected behavior
I can log in.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: