Skip to content
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 Google OAuth support #7430

Merged
merged 5 commits into from
Dec 2, 2022
Merged

Add Google OAuth support #7430

merged 5 commits into from
Dec 2, 2022

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Oct 14, 2022

Clean version of #6830. Reviewable commit by commit.

Fixes #6454

To do

How to test

Scenario one: fresh avocado account

  1. Follow the admin docs to obtain and save a client ID and secret
  2. Open the app
  3. Enter your gmail address
  • See the form submit button change to Sign in with Google
  1. Follow the instructions on the screen

Scenario two: account migration

  1. Unlink gmail oauth if you set a client ID/secret already
  2. Enable 2FA for your gmail account, create an app password
  3. Open the app
  4. Add the account using the app password - the form submit button should say Connect
  5. Follow the admin docs to obtain and save a client ID and secret
  6. Open the app - account should still sync and open mail
  7. Open account settings, scroll to server settings - the form submit button should say 'Reconnect Google account*
  8. Reconnect the account - it now uses oauth instead of the app password

Screenshots

Screen Shot
Admin settings Bildschirmfoto vom 2022-10-14 13-42-14
Before setup Bildschirmfoto vom 2022-10-14 17-03-37
During setup Bildschirmfoto vom 2022-10-14 17-10-37

@ChristophWurst
Copy link
Member Author

https://github.com/nextcloud/nextcloud-vue/releases/tag/v7.1.0-beta.0 has arrived

@ChristophWurst ChristophWurst requested review from miaulalala, st3iny and sazanof and removed request for miaulalala November 18, 2022 09:06
@ChristophWurst ChristophWurst marked this pull request as ready for review November 18, 2022 09:06
@miaulalala

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@miaulalala

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@miaulalala

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as resolved.

@miaulalala

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@ChristophWurst

This comment was marked as resolved.

@miaulalala

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as resolved.

@GretaD

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as off-topic.

@GretaD

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as off-topic.

@ChristophWurst

This comment was marked as off-topic.

@miaulalala

This comment was marked as off-topic.

@miaulalala

This comment was marked as off-topic.

@miaulalala

This comment was marked as off-topic.

@miaulalala
Copy link
Contributor

WHat I also found was when adding an account, removing it and then adding it again, the signup process isn't smooth any more. i don't know why that is but I had to do the login twice any time the app is already authorised with Gmail to get to a logged in state

@ChristophWurst
Copy link
Member Author

I had to do the login twice any time the app is already authorised with Gmail to get to a logged in state

The login into your Google account?

@miaulalala
Copy link
Contributor

I had to do the login twice any time the app is already authorised with Gmail to get to a logged in state

The login into your Google account?

yes. So the flow would be:

  • enter gmail address
  • get oauth popup
  • accept the popup
  • popup closes but login form is displayed with the popup closed text
  • do the whole thing again
  • finally arrive at the logged in mail account page

@ChristophWurst
Copy link
Member Author

popup closes but login form is displayed with the popup closed text

When my popup closes I see

Bildschirmfoto vom 2022-12-01 15-35-03

and then

Bildschirmfoto vom 2022-12-01 15-35-10

No double login.

@ChristophWurst
Copy link
Member Author

Alright. This works. Could I get a review and approval @GretaD @miaulalala? :)

## Google OAuth

This app can allow users to connect their Google accounts with OAuth. This makes it possible to use accounts without 2FA or app password.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention app passwords as well? Or are they not going to work any longer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They work, but only if you use 2FA.

Copy link
Contributor

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, tested and works

Copy link
Contributor

@GretaD GretaD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@ChristophWurst ChristophWurst merged commit c8ae862 into main Dec 2, 2022
@ChristophWurst ChristophWurst deleted the feature/google-oauth2 branch December 2, 2022 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GMail compatibility without app passwords
3 participants