spacebase / spacebasenz

Website for SpaceBase New Zealand
http://dev-spacebasenz.pantheonsite.io/
GNU General Public License v2.0
0 stars 0 forks source link

278: Implement social network logins #284

Closed treasuretron closed 4 years ago

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 11, 2018, 22:46

Implement user login using social network accounts. Initially only Google account login implemented.

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 11, 2018, 22:52

Added the contrib modules social_api, social_auth, social_auth_google and configured. Created an initial test google application using my xequals.co.nz credentials. App details are: Client id: 1049414991917-ujf176bp85ftqkf2fsumfiopojvfvhd5.apps.googleusercontent.com Client secret: aRhQVFPShiVdlbSU3MPBvhGe App currently only supports logins from the spacebase.co domain. Needs to be reconfigured to recognise the us.platform.sh domain (and sub-domains) to allow testing.

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 11, 2018, 22:52

The spacebase theme needs some additions to display a "login with Google" button on the login form or possible the front page.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 12, 2018, 19:08

"google" site:docs.platform.sh only comes up with 7 results, none of the which are relevant, so looks like this will be a support request.

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 12, 2018, 19:31

Examining the options for the Google api app that is required, we should be able to configure this to use the authorized domain of "https://ensz4qdpjmziw.us.platform.sh/". It will then work for any sub-domain, which means any of the dev or automatically created branch environments.

However, the site currently reports "no route configured" for this domain, so we need to add a Platform.sh route into the "routes.yaml" file in the codebase.

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 13, 2018, 16:11

Response from Google App review team in respect of the app configured for testing the changes. Will need to follow their advice and work with an unverified app for dev/text environments, and get the app configured for the live environment.

-- Dear Developer,

Thank you for reaching out to us!

Unfortunately, testing/development apps are inapplicable for the Verification process.

If your app is only for testing purposes, we recommend that you continue to use your app with the “unverified app” screen intact.

Thank you for your patience. Please do not hesitate to reach out to us if you have questions or concerns.

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 13, 2018, 23:11

I have deleted the original Google+ app and created a new one that now supports the domains:

While it is still being verified, I have been able to successfully log into the feature branch using a google account from two separate computers.

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 14, 2018, 16:13

Verification process requires a small specially named file to be uploaded to the root of each domain to be verified. The same file satisfies Google for all domains. File added to the feature branch and pushed to Gitlab. File should not be removed for as long as the application is using the Google+ APIs.

treasuretron commented 4 years ago

In GitLab by @starshyyne on Nov 14, 2018, 16:39

assigned to @starshyyne

treasuretron commented 4 years ago

In GitLab by @starshyyne on Nov 14, 2018, 16:39

I will add a button to the login screen to say "login with google"

treasuretron commented 4 years ago

In GitLab by @jayelless on Nov 14, 2018, 16:46

The feature branch is now verified by Google. The dev and master branches can also be verified once the appropriate merging has been completed.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 14, 2018, 18:11

@starshyyne we'll need one for signing up via google, too.

treasuretron commented 4 years ago

In GitLab by @starshyyne on Nov 14, 2018, 21:11

I've added a block called "social logins" and added it to the login page and the user register page.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 20, 2018, 21:38

created branch 278-implement-social-network-logins

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 20, 2018, 21:38

mentioned in merge request !225

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 20, 2018, 21:52

created branch 278-implement-social-network-logins-2

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 20, 2018, 21:52

mentioned in merge request !226

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 20, 2018, 22:40

@starshyyne trying this for block content migration https://www.drupal.org/project/simple_block

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 21, 2018, 20:27

@richbodo this is currently testable at https://dev-54ta5gq-ensz4qdpjmziw.us.platform.sh

treasuretron commented 4 years ago

In GitLab by @richbodo on Nov 22, 2018, 12:09

Tested. Landing on edit-account-settings (https://dev-54ta5gq-ensz4qdpjmziw.us.platform.sh/user/479/edit) is unconventional.

I would put the user on their profile page or the home page, logged in, not editing.

Other than that, this worked well for me in one test of google oauth login.

I like it so far!

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Nov 22, 2018, 17:03

No problem, we'll fix it with a post-authentication redirect.

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Dec 3, 2018, 22:57

@starshyyne this is still waiting on front end work from you, google auth block is currently not visible. When it was working you had a block containing a link with a class, I recall, which was how you were referencing the theme work. I know there ought to be a standard content migration solution in place to avoid this kind of thing, but in its absence, can you paste the content of the block and its name in here so we can re-impliment manually on other environments if required?

treasuretron commented 4 years ago

In GitLab by @jayelless on Dec 10, 2018, 19:45

I have updated the feature branch to recover the social logins block that was created, and have made this a simple-block so it is exported with the configuration. Merge request is now ready for testing again.

treasuretron commented 4 years ago

In GitLab by @jayelless on Dec 10, 2018, 19:57

unassigned @starshyyne

treasuretron commented 4 years ago

In GitLab by @jayelless on Dec 10, 2018, 22:51

changed title from Implement social network logins to {+278: +}Implement social network logins

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Dec 11, 2018, 21:30

closed via merge request !226

treasuretron commented 4 years ago

In GitLab by @thomasmurphy on Dec 11, 2018, 21:30

mentioned in commit 38a69653eff3725bd654e8b49d55af200fe53e20