I'm on 2019.12 NG-Client running on Tomcat 9 Ubuntu trying to authorise my users to send email via their google-based email accounts. I'm using the oauth plugin. Servoy connects to Google, shows the authorisation screen, but then the user clicks to allow, the Google redirects to a URL with one extra level in it:
- Code: Select all
https://<mydomain>:8443/<mysolution>/<mysolution>/solutions/<mysolution>/index.html?code=<some_very_long_code>&scope=https://mail.google.com/&https:=&<mydomain>:8443=<mysolution>&solutions=<mysolution>&m=google_oauth_callback
It should be
- Code: Select all
https://<mydomain>:8443/<mysolution>/solutions/...
So Tomcat throws an error because the url is not valid.
The code is:
- Code: Select all
function authorise_sending_email() {
plugins.oauth.serviceBuilder(CLIENT_ID)
.clientSecret(CLIENT_SECRET)
.deeplink('google_oauth_callback')
.callback(google_oauth_callback, 30)
.scope('https://mail.google.com/')
.build(plugins.oauth.OAuthProviders.GOOGLE);
}
Any idea of where I may have gone wrong?