FriendsOfFlarum / passport

The Laravel passport compatible oauth extension for your Flarum forum.
https://discuss.flarum.org/d/5203
MIT License
27 stars 12 forks source link

put a link in redirect page #38

Closed blankwy closed 9 months ago

blankwy commented 9 months ago

Feature Request

When I completing the oauth in some browser which without supports to pop up window etc.,the account program will redirect to the redirect_url(<your flarum install>/auth/passport),but the redirect_url won't redirect to the target url(such as binding or register account),the page will stay in blank.

It result in that if I put the flarum in a webview of app(don't support multiple windows normally),the plugin can't work.

Some tips and a link to redirect to target page can be put in the page of redirect_url after authorizing,user can click to redirect manually.

clarkwinkelmann commented 9 months ago

I actually created a separate extension that addresses this issue https://github.com/clarkwinkelmann/flarum-ext-auth-popup-failsafe

EDIT: and just to add some context to the issue, a link by itself is not sufficient because the oauth process finishes inside of a Flarum modal which cannot be perma-linked. My extension both adds a way to perma-link that modal with the authentication payload as parameter and adds that link to the popup HTML.

Really this should be fixed in Flarum itself because that's where the code that handles the redirect popup and the authentication modal is. It also affects other extensions that use that internal API but without extending FoF OAuth or FoF Passport.