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

Issue with redirect after an OAuthProviderLinkFailedResponse #353

Closed
jamesmills opened this issue Apr 2, 2024 · 8 comments
Closed

Issue with redirect after an OAuthProviderLinkFailedResponse #353

jamesmills opened this issue Apr 2, 2024 · 8 comments
Labels
bug Something isn't working needs more info

Comments

@jamesmills
Copy link

Stack

Jetstream – Livewire

Package Version

5.4

Laravel Version

10

Livewire Version

3

react Version

No response

Vue Version

No response

PHP Version

8.2

Problem description

When trying to connect a Facebook account which has already been attached to another account I'm getting an error from OAuthProviderLinkFailedResponse which is a 404 because it cannot find https://domain.test/profile.show#_=_.

The flow is expected but it looks like this line is not working as intended.

if (class_exists(Jetstream::class)) {
            return redirect()->to('profile.show');
        }

If I comment this out and try again I do get the error message "It looks like this Facebook account is used by another user. Please log in."

Here is a Loom video to show and explain more.

https://www.loom.com/share/9c7d17527cd14c3ea0c026bbe34c035a?sid=9ddc1d48-5e80-4e86-b163-7e4fb229fe43

Thanks in advnce.

Expected behavior

I expected to go to a view that does exist.

Steps to reproduce

https://www.loom.com/share/9c7d17527cd14c3ea0c026bbe34c035a?sid=9ddc1d48-5e80-4e86-b163-7e4fb229fe43

Reproduction repository

https://github.com

Relevant log output

No response

@jamesmills jamesmills added the bug Something isn't working label Apr 2, 2024
Copy link

github-actions bot commented Apr 2, 2024

Hey @jamesmills! We're sorry to hear that you've hit this issue. 💙

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Socialstream code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@jamesmills jamesmills changed the title Issue with redirect after an Issue with redirect after an OAuthProviderLinkFailedResponse Apr 2, 2024
@joelbutcher
Copy link
Owner

Can you give me the output of art route:list | grep profile. please?

@joelbutcher joelbutcher reopened this Apr 2, 2024
@jamesmills
Copy link
Author

GET|HEAD  user/profile ................................................................................................................................... profile.show › Laravel\Jetstream › UserProfileController@show
  PUT       user/profile-information ............................................................................................. user-profile-information.update › Laravel\Fortify › ProfileInformationController@update

@jamesmills
Copy link
Author

jamesmills commented Apr 2, 2024

Does return redirect()->to('profile.show'); expect a "path" and return redirect()->route('profile.show'); expect a "route name" like you're using?

@joelbutcher
Copy link
Owner

@jamesmills Yep, this was fixed in 6.x, but is a regression for 5.x. Just written a test for this and opened a PR 👍

@jamesmills
Copy link
Author

@jamesmills Yep, this was fixed in 6.x, but is a regression for 5.x. Just written a test for this and opened a PR 👍

I'll upgrade versions when I've upgraded to Laravel 11.

Thanks @joelbutcher and thanks for an awesome package!

@jamesmills
Copy link
Author

On a side note... the error message says "It looks like this GitHub account is used by another user. Please log in.". What does the "Please log in." mean?

@jamesmills jamesmills reopened this Apr 2, 2024
@joelbutcher
Copy link
Owner

@jamesmills it should indicate that the user needs to log in using their existing Laravel profile user. If you feel this is not clear enough, I'd welcome a PR to make it clearer and more succinct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs more info
Projects
None yet
Development

No branches or pull requests

2 participants