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

[SDK-3585] Fix: Missing Code error on Callback Route for Octane Customers #297

Merged
merged 2 commits into from
Aug 8, 2022

Conversation

evansims
Copy link
Member

@evansims evansims commented Aug 8, 2022

Changes

This PR resolves an issue for customers using our Laravel SDK with Laravel Octane.

Bug: With this combination, upon a user returning to the callback route (Auth0\Laravel\Http\Controller\Stateful\Callback) they would be presented with a Missing Code error.

Cause: The underlying Auth0 PHP SDK fetches the code and state parameters of the callback using the standard PHP super global _GET. This super global is not available when running Laravel under Octane. Within our Laravel SDK, we are (correctly) using Laravel's Illuminate\Http\Request->query() method to check for the presence of these values. However, we had not handed these values off directly to the underlying Auth0 PHP SDK, and instead allowed it to attempt to extract them itself from _GET, which would fail under Octane.

Fix: The Laravel SDK now correctly extracts these values using Octane-compatible Laravel APIs and hands them off to the underlying Auth0 PHP SDK directly, avoiding the conflict from the missing _GET super global.

References

Resolves #218 (comment)

Testing

Contributor Checklist

@evansims evansims marked this pull request as ready for review August 8, 2022 21:44
@evansims evansims requested a review from a team as a code owner August 8, 2022 21:44
@evansims evansims changed the title Fix Missing Code error on Callback Route for Octane Customers Fix: Missing Code error on Callback Route for Octane Customers Aug 8, 2022
@evansims evansims changed the title Fix: Missing Code error on Callback Route for Octane Customers [SDK-3585] Fix: Missing Code error on Callback Route for Octane Customers Aug 8, 2022
@evansims evansims merged commit 1a4b3ee into main Aug 8, 2022
@evansims evansims deleted the fix/laravel-octane branch August 8, 2022 21:49
@evansims evansims mentioned this pull request Aug 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants