Passport: Can we override the default laravel_token cookie name?

Created on 22 Jul 2017  ·  2Comments  ·  Source: laravel/passport

Hi there, just _curious_ to know whether this is possible.

I notice there is a comment regarding this in issue https://github.com/laravel/passport/issues/278, so I am assuming it's not possible.

Considering the normal Laravel session cookie's name is configurable, is there any reason as to why this cookie's name isn't?

Thanks!

Most helpful comment

Passport::cookie('Place Cookie name here');

I use:
Passport::cookie(config('session.cookie') . '_token');

This just adds a suffix of _token to your current session cookie name

All 2 comments

Passport::cookie('Place Cookie name here');

I use:
Passport::cookie(config('session.cookie') . '_token');

This just adds a suffix of _token to your current session cookie name

Thanks @tjmartin69!

Was this page helpful?
0 / 5 - 0 ratings