Laravel 5.3 Passport: Password Grant -> Logout

Posted 2 years ago by da.eXecutoR

Hi everyone!

First things first, I'm pretty new to Laravel. It's my first PHP framework I ever used and so far I love it!

I'm developing a new Single Page Application and my setup looks like this:

api.dev | local homestead environment with Laravel 5.3 as Back-end API server

app.dev | local vagrant environment with angularjs + html5 as Front-end

I managed to get the api.dev laravel project up and running using passport to handle authentication with tokens.

I use angular-oauth2 (https://github.com/oauthjs/angular-oauth2) plugin for handling the tokens. I'm able to login and also the protected routes working as intended. Now the plugin has a function to logout a user by calling "OAuth.revokeToken()". The problem is, I don't get a "revoke" route from passport so I don't now how to logout a user.

All the routes I get are the following:

oauth/authorize

oauth/token

oauth/tokens

oauth/tokens/{token_id}

oauth/token/refresh

oauth/clients

oauth/clients/{client_id}

oauth/scopes

oauth/personal-access-tokens

oauth/personal-access-tokens/{token_id}

Maybe someone can put me into the right direction.

Greetings

eXe

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.