Getting the Cookie Name Used for Authentication

Problem

You want to know the name of the cookie used for authentication.

Solution

Use the Auth::getName() method.

$cookie_name = Auth::getName();

Discussion

This is a long name beginning with the word 'login_'.

Most often, it's something like login_82e5d2c56bdd0811318f0cf078b78bfc.

comments powered by Disqus