Overslaan "Toegang tot applicatie autoriseren"

Thanks @riking this works fine when we have an open session on discourse in the navigator.

We are able to initiate a new session by hand just calling http://discourse_site/login as we have SiteSetting.enable_local_logins = false and only one auth mechanism with oauth. The browser follows redirects on our oauth provider then redirects to discourse. It was what was happening under the hood when calling /user-api-key/new.

How could we initiate a new discourse session programmatically from the app if there is none ?