the-djmaze / snappymail

Simple, modern & fast web-based email client
https://snappymail.eu
GNU Affero General Public License v3.0
977 stars 114 forks source link

Google OAuth not possible with nextcloud #1663

Closed ZambeiCloud closed 1 month ago

ZambeiCloud commented 1 month ago

Describe the bug I can't login to my gmail account with the OAuth plugin. After the OAuth process, I'm redirected to the redirectUrl which then redirects to /custom_apps/snappymail/app/. The browser here displays "Not inside Nextcloud".

To Reproduce Steps to reproduce the behavior:

  1. Install Google OAuth plugin
  2. Click on GMail button on the login screen
  3. Click through the OAuth process
  4. See error

Expected behavior I can login with my gmail account through OAuth

Screenshots

image

Please complete the following information:

the-djmaze commented 1 month ago

Redirect url of SnappyMail should be https://...your.domain.../custom_apps/snappymail/?LoginGMail Because you access it through https://...your.domain.../custom_apps/snappymail/

So check your settings.

ZambeiCloud commented 1 month ago

Hi, thanks for your answer. It doesn't seem to be an issue with the redirect url. I access snappy mail inside nextcloud through https://...your.domain.../apps/snappymail For testing, i changed the redirect url in the googe api settings to https://...your.domain.../custom_apps/snappymail/?LoginGMail and got the redirect_uri_mismatch error from google.

image

With https://...your.domain.../apps/snappymail after the OAUTH process it's coming back to the correct URL but is immediately redirected to /custom_apps/snappy_mail/app

image

Thank you for your help!

the-djmaze commented 1 month ago

The issue is SnappyMail application.ini app_path. So the change i made might work.