stackvana / hook.io

Open-Source Microservice Hosting Platform
https://hook.io
Other
1.26k stars 117 forks source link

Improve Signup Flow and Github Single Sign-On Flow #265

Open Marak opened 7 years ago

Marak commented 7 years ago

The current behavior when a user signs up with just an email address is that the email address is slugified to a username. This is not ideal.

The signup process should allow both username and email at the same time.

In addition, it seems that if a user links their Github account after creating an account by email, it will create a new account if the account names are not the same. Instead, the Github account should link with the pre-existing session.

Marak commented 7 years ago

Marked as high priority.

Marak commented 7 years ago

Seems to also be a similar issue with accounts linked from Stripe. Password resets seem to not be working either.

Marak commented 6 years ago

We are no longer slugifying the user email into a username, which is good. Username and email are now required for all accounts before services can be accessed. There are now additional UX and API endpoints to facilitate this behavior.

I believe there is still an issue with Github SSO sometimes not lining up.

zaverden commented 6 years ago

hello @Marak

I think signup via github is broken now.

I'm trying to signup via github (I dont have an account). I go to https://hook.io/login and and click Log In with Github. After auth on Github it sends me to https://hook.io/login/github/callback?code={my_code}. And it shows me an error (I see it in my browser window):

{
    "status": "error",
    "errors": [
        {
            "property": "email",
            "constraint": "required",
            "expected": true,
            "actual": false,
            "value": "",
            "message": "Required value is missing"
        }
    ]
}

Then I go to main page https://hook.io and it redirects me to https://hook.io/email-required. It redirects me to email-required from any page I try to go. The site shows me Log Out button - it thinks I'm authorized. So, I'm on Update Account with Email Address form try to add my email. But POST https://hook.io/email-required with my email returns another error (I got this json from devtools):

{
  "error": true,
  "message": "not found"
}

Is it possible to signup via guthub? Or it is supposed to be like sign up with email/password and then assign github acc for SSO?

Marak commented 6 years ago

@zaverden I think the remaining issue we have is for Github accounts which have a non-public email address associated with their accounts.

In other words, is it possible your setting in Github is for email to remain private?

If that is the case we know root cause of issue and I think I can resolve it.

zaverden commented 6 years ago

@Marak yes, I believe I did not set a public email for my github account.

Anyway, I was able to sign up by email/username/password and then have linked hook.io account with my github account.

Marak commented 6 years ago

Thanks for confirming the issue @zaverden

I'll see if we can patch this so it won't happen again.

Please let us know if you run into any other issues.

Marak commented 5 years ago

This just came up again and I just now have been able to reproduce the issue.

Will try to have a resolution out before the end of the day.

zaverden commented 5 years ago

Hello @Marak

Tried to start with new account and got same error I described above

I found that in both cases my profiles don't have a public email (on page https://github.com/settings/profile). And if I add a public email - process goes without any problems.

I hope this peace of info will help to locate and solve an issue