# README
Gale
Gale is an authentication addon for the Goravel framework, designed to simplify and enhance user authentication processes.
Version
kkumar-gcc/gale | goravel/framework |
---|---|
v1.0.x | v1.14.x |
Install
Global Installation
To install Gale globally, use the following command:
go install github.com/kkumar-gcc/gale@latest
Project-Level Installation
Alternatively, you can install Gale directly within your Goravel project:
- Add Gale as a Dependency
Navigate to your Goravel project directory and run:
go get -u github.com/kkumar-gcc/gale
- Register Gale's Service Provider
To make Gale functional within your project, you need to register its service provider in yourconfig/app.go
file:
import (
gale "github.com/kkumar-gcc/gale/providers"
)
"providers": []foundation.ServiceProvider{
// ...
&gale.ServiceProvider{},
}
- Run Gale Installation Command
After adding Gale to your project, run the following command within your project directory to install the necessary files:
go run . artisan install
## global installation
gale install
Options provided by the install
command:
--stack / -s
: Specifies the authentication stack to install. Options:api
.--driver / -m
: Specifies the database driver to use. Options:mysql
,postgres
,sqlite
.
Usage
To integrate Gale into your Goravel application, follow these steps:
- Add Authentication Routes
Add theAuth
function fromroutes/auth.go
to yourroute_service_provider.go
file. This will register the authentication routes provided by Gale:
func (receiver *RouteServiceProvider) Boot(app foundation.Application) {
// ...
routes.Auth()
}
- Run Migrations
Run the following command to execute the migrations required for Gale to function:
go run . artisan migrate:fresh
License
Gale is open-source software licensed under the MIT license.