[GH-ISSUE #156] The GET method is not supported for this route. Supported methods: POST #69

Closed
opened 2026-02-25 20:32:20 +03:00 by kerem · 3 comments
Owner

Originally created by @mvdgeijn on GitHub (May 18, 2020).
Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/156

Hi,

I don't know if this is a misconfiguration, or a bug, but I'm getting the error "The GET method is not supported for this route. Supported methods: POST" when I enter the MFA code wrong, and after that enter the right code. On entering the correct code the second time, the error appears.

When entering the correct code the first time, no problem occurs and everything runs as expected.

I'm not sure what code I should add to this question, but I can post relevant parts when needed.

Thanks!

Originally created by @mvdgeijn on GitHub (May 18, 2020). Original GitHub issue: https://github.com/antonioribeiro/google2fa/issues/156 Hi, I don't know if this is a misconfiguration, or a bug, but I'm getting the error "The GET method is not supported for this route. Supported methods: POST" when I enter the MFA code wrong, and after that enter the right code. On entering the correct code the second time, the error appears. When entering the correct code the first time, no problem occurs and everything runs as expected. I'm not sure what code I should add to this question, but I can post relevant parts when needed. Thanks!
kerem closed this issue 2026-02-25 20:32:20 +03:00
Author
Owner

@Snakzi commented on GitHub (Jul 22, 2020):

Did you solve your issue? I have the exact same.

<!-- gh-comment-id:662306708 --> @Snakzi commented on GitHub (Jul 22, 2020): Did you solve your issue? I have the exact same.
Author
Owner

@MarkTatterTierney commented on GitHub (Sep 3, 2020):

Route::post('2fa', function () { return redirect(route('asset.index')); // Default 'home' page after login. })->name('2fa')->middleware('2fa');

I had the same issue so Instead of having a redirect to previous URL I changed it to a default home page or dashboard redirect. Seemed to fix the issue.

<!-- gh-comment-id:686335677 --> @MarkTatterTierney commented on GitHub (Sep 3, 2020): `Route::post('2fa', function () { return redirect(route('asset.index')); // Default 'home' page after login. })->name('2fa')->middleware('2fa');` I had the same issue so Instead of having a redirect to previous URL I changed it to a default home page or dashboard redirect. Seemed to fix the issue.
Author
Owner

@mvdgeijn commented on GitHub (Sep 18, 2020):

Thanks @MarkTatterTierney, I also fixed this using simular code.

<!-- gh-comment-id:694817993 --> @mvdgeijn commented on GitHub (Sep 18, 2020): Thanks @MarkTatterTierney, I also fixed this using simular code.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/google2fa#69
No description provided.