Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got a white page after oauth. thanks. #41

Open
guoxiangke opened this issue Jul 22, 2024 · 3 comments
Open

I got a white page after oauth. thanks. #41

guoxiangke opened this issue Jul 22, 2024 · 3 comments

Comments

@guoxiangke
Copy link

Hi, after I login with laravel passport site, after I give permission, It redirect to this page
https://flarum.my.site/auth/passport?code=def50xxxxx0c411f5ba2c870b0ff0f12139&state=89152fb7f2xxxxxf1115a1979
with a blank page and stay there.

some one can help? thanks

flarum/core                                    v1.8.5    Delightfully simple forum software.
fof/passport                                   1.1.1     The OAuth2 (and Laravel passport) compatible oauth extension
@clarkwinkelmann
Copy link
Member

Check the Flarum log and webserver log for any error message https://docs.flarum.org/troubleshoot

If there's nothing in the Flarum log, it might be a general PHP error or warning that will be logged to the webserver or general system log file of the server.

@guoxiangke
Copy link
Author

guoxiangke commented Jul 30, 2024

finally, I find the bug:
image

window.close(); window.opener.app.authenticationComplete({"email":"omTsc6gIRTSQnsomr6qZoiUeug4k@wx","token":"uzuk75qdzXX1PSXidaKHdhzzCQlGcw2Si9MfQpAD","provided":["email"]});

while Uncaught TypeError: Cannot read property 'app' of null
which means no (opener)!
"window.opener" is null / undefined. for the empty page load nothing, just the <script>

@guoxiangke
Copy link
Author

guoxiangke commented Jul 30, 2024

Finally I got it:
Here is my auth flow:
/auth/passport => auth.laravel.com => wechat.auth.server.com

for the login with button(wechat login) opened a new window(logInPopup with status=no,scrollbars=yes,resizable=no etc).
while I use the login button in a wechat App, then there is only one window(for wechat app restrict, so window.opener is null ), it can't popup a windows to redirect to wechat auth service then go back to the main window.
SO, I need a solution without popup a auth window, instead, I need go /auth/passport directly then go back to home page.
how to solve this? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants