Category: Laravel

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together. If nothing happens, download GitHub Desktop and try again.

You can install the package via composer: And publish the config via artisan: You will have to add the Recoverable trait to your model you want to have recovery codes and should add a json or array cast to the attribute holding the recovery codes. By default the trait uses a recovery_codes attribute/column - you can change this by setting $recoveryCodesName property: To set the new recovery codes to your model you should use the setRecoveryCodes() method because this method automatically hashes the recovery codes, if not already hashed.

Now that you have setup your app to generate and store recovery codes you should add the logic to recover an account.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners