backdrop-ops / backdropcms.org

Issue tracker for the BackdropCMS.org website
https://backdropcms.org
25 stars 21 forks source link

Allow single-sign-on with GitHub #178

Open jenlampton opened 8 years ago

jenlampton commented 8 years ago

We would like to allow people to sign on from GitHub, so existing GitHub users do not need to create new accounts on backdropcms.org. This will also allow backdrop contributors an additional level of access on the Backdrop site, to manage their own projects.

A follow-up from https://github.com/backdrop-ops/backdropcms.org/issues/61

Gormartsen commented 8 years ago

Questions:

klonos commented 8 years ago

"Connect/Disconnect GitHub account" for button label seems good.

For username collisions you could also append .github to the username or use email instead. Both seem fine to me.

jenlampton commented 8 years ago

do we need a block to display github auth button on https://backdropcms.org/user/login or do I need update user/login form via form alter?

form_alter would be fine.

I am planning to use github data (email and username) to create backdrop user. It means that user would be able to set password later and use login password to login. Any special requests based on this info ?

I think that sounds reasonable. no special requests :)

I am plaining to add button "connect github account" (suggestions for button name?) to add ability to login via github for already registered users. For already connected users there is going to be "disconnect" button. Suggestions and requests for this feature?

Sounds perfect!

There is possible username collisions when login on backdropcms.org is already taken. I am proposing to use email in this case. Any suggestions?

In most cases the collision will happen when the same person already has an account. Instead of creating one, can we throw an error stating the username already exists, and asking the person to sign in first? I'd rather have them choose a different borg username and then "link" their account.

Gormartsen commented 8 years ago

Thanks!

Gormartsen commented 8 years ago

@jenlampton @klonos ready to test. https://github.com/backdrop-contrib/githubapi/releases/tag/1.x-1.0.1 or master branch.

Make sure you registered oAuth application on github and properly configured githubapi settings.

Gormartsen commented 8 years ago

@quicksketch after testing you can push it to backdropcms.org.

There is no changes to githubapi by itself (few typos mostly). It should not brake anything else related to githubapi module.

Simply update code, enable githubapi_sso and try to use it by yourself.

Gormartsen commented 8 years ago

Also would like to add. When we register or connect github account there is fields bio hireable and avatar url. I believe we can automatically save this data to fields...

Can you drop me an example how to properly add this values to $account = entity_load('user' ..) object to save them by $account->save().

jenlampton commented 8 years ago

👍 fantastic job @Gormartsen Can't wait to give this a test :)

klonos commented 8 years ago

Thanx @Gormartsen :+1: ...unfortunately, I won't have time to test this on a private website. Sorry. I will give it a go once deployed on b.org though.

Gormartsen commented 8 years ago

I found bug with login page:) will fix it soon.

Regards, Gor Martsen @gormartsen

On May 25, 2016, at 8:00 AM, Gregory Netsas notifications@github.com wrote:

Thanx @Gormartsen 👍 ...unfortunately, I won't have time to test this on a private website. Sorry. I will give it a go once deployed on b.org though.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

Gormartsen commented 8 years ago

Fixed. 1.x-1.0.2 launched. Ready to use.

quicksketch commented 8 years ago

Awesome! I can't wait to give this a go!

quicksketch commented 8 years ago

While fixing the packager I released (and then updated) BackdropCMS.org to 1.x-1.0.4 of GitHub API module. So now we actually have the main site running the latest version. We still need further review and integration into the login page itself.

kreynen commented 6 years ago

I was looking at back/side porting https://www.drupal.org/project/social_api and https://www.drupal.org/project/social_auth_github/ before realizing that https://github.com/backdrop-ops/backdropcms.org/tree/master/www/modules/contrib/githubapi/githubapi_sso already exists.

I was going to test that, but ran into another packaging error.

I still think social_api is a great approach to social media integration and authentication, but is there a reason you aren't using githubapi_sso on backdropcms.org now?

ghost commented 3 years ago

What's the current status of this issue?

jenlampton commented 3 years ago

I don't think github_api was ever ported to Backdrop. Maybe that's the next step?

laryn commented 3 years ago

Looks like it has some open issues:

Also noting that this module should technically allow Github SSO (I've done early testing with Google mostly and none yet with Github):