Skip to content

Commit

Permalink
Modify README file
Browse files Browse the repository at this point in the history
Add test script in composre.json
  • Loading branch information
Mohammadreza-73 committed Jan 15, 2024
1 parent 392cf80 commit 84bd25d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This package creates a 6 digits token, which allows you to send it by SMS, email, etc to users and they can login into their account with that token by sending it to specific endpoint.

Tokens are auto expiring and single use.
# Installation:
## Installation:
```
composer require m.rahimi/laravel-tokenize-auth
```
Expand All @@ -17,7 +17,7 @@ Then publish the config file:
php artisan vendor:publish
```

# Basic usage:
## Basic usage:
Basically, this package introduces 2 endpoints, which you can send requests to them.

1. Generate and send the token to the user
Expand All @@ -31,7 +31,7 @@ POST '/tokenized-login/[email protected]'
```
Note: If you want to use another shape of urls, just disable default routes in config file ```'use_default_routes' => false,``` and define your routes.

# Customization:
## Customization:
You are free to customize and swap the default classes, with your own classes.

If you want to swap the default implementations behind the facades with your own, you can do it within the `boot` method of any service provider class like this :
Expand Down Expand Up @@ -97,12 +97,16 @@ If you want to swap the default implementations behind the facades with your own
];
```

# Testing:
## Testing:
```
vendor/bin/phpunit
composer test
```

--------------------
## :raising_hand: Contributing
If you find an issue, or have a better way to do something, feel free to open an issue or a pull request.

### :raising_hand: Contributing
If you find an issue, or have a better way to do something, feel free to open an issue or a pull request.
## Security
If you discover any security related issues, please email [[email protected]](mailto:[email protected]) instead of using the issue tracker.

## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,11 @@
"TokenizedLogin\\TwoFactorAuthServiceProvider"
]
}
},
"scripts": {
"test": "vendor/bin/phpunit"
},
"config": {
"sort-packages": true
}
}

0 comments on commit 84bd25d

Please sign in to comment.