# Authentication Service - API

## Installation

### Clone repository

`git clone git@github.com:CityConnectBr/angra-auth-service-api.git`

### Enter directory

*OBS.: If you are using container make this steps and the following ones inside the container*

`cd angra-auth-service-api`

### Configure .env with your environment configuration

`cp .env.example .env`

### Install dependencies

`composer install`

### Configuring passport

#### Run migrations

`php artisan migrate`

#### Install passport configuration and generate client credentials from your own app

`php artisan passport:install --uuids`

*OBS.: This command will ask to fresh migrations, you should say YES. If it shows an error, access your DB and manually delete "files" table. Then, try again.*


### Generating client credentials

If you wish to generate a client credential to your app, run:

`php artisan passport:client --password`

![Alt text](image.png)

Get Client ID and Client Secret and put this information in your client api.

