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

[3.x] User Provider: Do not access rehash function in L10 #101

Merged
merged 1 commit into from
Dec 29, 2024

Conversation

saibotk
Copy link
Contributor

@saibotk saibotk commented Dec 5, 2024

This function was added in Laravel 11.
Currently, this causes an exception when using Fortify with 2FA and Laravel 10 together with WebAuthn.

In Fortify the function is called when it detects that it exists, for compatibility with Laravel 10. But since we implement this function in WebAuthn, we need to also add a check if this actually exists on the parent class.

So in Laravel 10 we will just ignore the function and do nothing. This should be a sufficient workaround to support both.

Tested this in a Laravel 10 project and also tested that it will still call the parent function once defined.

Thanks for your work!

Partially verified

This commit is signed with the committer’s verified signature.
JCZuurmond’s contribution has been verified via GPG key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
This function was added in Laravel 11.
Currently, this causes an exception when using Fortify with 2FA and Laravel 10 together with WebAuthn.

In Fortify the function is called when it detects that it exists, for compatibility with Laravel 10. But since we implement this function in WebAuthn, we need to also add a check if this actually exists on the parent class.

So in Laravel 10 we will just ignore the function and do nothing. This should be a sufficient workaround to support both.
Copy link

sonarqubecloud bot commented Dec 5, 2024

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (3.x@dbdf65c). Learn more about missing BASE report.

Additional details and impacted files
@@          Coverage Diff           @@
##             3.x     #101   +/-   ##
======================================
  Coverage       ?   84.88%           
  Complexity     ?      441           
======================================
  Files          ?       69           
  Lines          ?     1138           
  Branches       ?        0           
======================================
  Hits           ?      966           
  Misses         ?      172           
  Partials       ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DarkGhostHunter DarkGhostHunter merged commit d1fd316 into Laragear:3.x Dec 29, 2024
18 of 19 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants