the-djmaze / snappymail

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

Google OAuth not possible with nextcloud #1663

Closed ZambeiCloud closed 4 months ago

ZambeiCloud commented 4 months 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 4 months 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 4 months 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 4 months ago

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