This repository has been archived by the owner on Dec 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db47685
commit 5d53813
Showing
13 changed files
with
517 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{vue,js,json,html,scss,blade.php}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,16 @@ | ||
# Google Authenticator support for Laravel Spark | ||
# Google Authenticator for Laravel Spark 6 | ||
|
||
This package replaces the default Two-Factor Authentication driver with [Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en). | ||
This package replaces the default two-factor authentication driver with [Google Authenticator](https://support.google.com/accounts/answer/1066447?hl=en). | ||
|
||
![Demo](http://i.imgur.com/WQKx5nS.gif) | ||
|
||
## Installation | ||
|
||
- Run `composer require eusebiu/laravel-spark-google2fa` | ||
- `composer require eusebiu/laravel-spark-google2fa` | ||
- `php artisan vendor:publish --provider="Eusebiu\LaravelSparkGoogle2FA\Google2FAServiceProvider" --force` | ||
- `php artisan migrate` | ||
- `npm run dev` | ||
|
||
- Add `Eusebiu\LaravelSparkGoogle2FA\Google2FAServiceProvider::class` to your `providers` array in `config/app.php` after `SparkServiceProvider`. | ||
## Customization | ||
|
||
- Run `php artisan config:clear` | ||
|
||
- Run `php artisan vendor:publish --provider="Eusebiu\LaravelSparkGoogle2FA\Google2FAServiceProvider" --tag=migrations --tag=assets` | ||
|
||
- Run `composer dumpautoload` | ||
|
||
- Run `php artisan migrate` | ||
|
||
- Edit `resources/views/vendor/spark/settings/security/enable-two-factor-auth.blade.php` and replace everything with `@include('google2fa::enable-two-factor-auth')` | ||
|
||
- Edit `resources/assets/js/spark-components/settings/security/enable-two-factor-auth.js` and replace `require('settings/security/enable-two-factor-auth')` with `require('./enable-two-factor-auth-google')` | ||
|
||
- Run `npm run dev` | ||
|
||
## Customise the display name | ||
|
||
The display name in the authenticator app is chosen from the ```$details``` section in your ```SparkServiceProvider``` file. | ||
|
||
The following order is used, the first variable that's found will be the display name. | ||
|
||
1. ```$details['2fa_name']``` (not present by default) | ||
2. ```$details['vendor']``` (present by default) | ||
3. the domain name (safe fallback) | ||
To change the display name in the authenticator app, add `2fa_name` in your `SparkServiceProvider` file. By default `vendor` or the app url is used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.