Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds sanctum #139

Merged
merged 20 commits into from
Jun 30, 2020
Merged

adds sanctum #139

merged 20 commits into from
Jun 30, 2020

Conversation

raftx24
Copy link
Member

@raftx24 raftx24 commented Jun 5, 2020

steps for using sanctum

  1. install sanctum
    1. php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"
    2. php artisan migrate
  2. we should set SANCTUM_STATEFUL_DOMAINS to our domain name for example laravel-enso.com
  3. we should replace web middleware with api (of course we can still use web but it isn't good).
  4. we should add EnsureFrontendRequestsAreStateful::class to api middlewares.
  5. we should change web middleware to api in RouteServiceProvider.
  6. we should change config/auth.php
    1. api.driver from token to sanctum
    2. defaults.guard from web to api

@raftx24 raftx24 marked this pull request as draft June 5, 2020 13:22
@raftx24 raftx24 marked this pull request as ready for review June 5, 2020 17:46
@aocneanu aocneanu added this to In progress in Laravel Enso Jun 8, 2020
@aocneanu aocneanu moved this from In progress to In Review in Laravel Enso Jun 8, 2020
@raftx24 raftx24 merged commit a4dcc9c into laravel-enso:master Jun 30, 2020
Laravel Enso automation moved this from In Review to Done Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Laravel Enso
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants