laravel-sketchpad icon indicating copy to clipboard operation
laravel-sketchpad copied to clipboard

Passport Auth

Open yaofong opened this issue 8 years ago • 1 comments

Not sure is this a valid use case, but I'm building a API backend and would like to use sketchpad for collaborate with other developer, as well as testing our code.

Our API uses Laravel Passport password grant in order to consume the API.

But when using sketchpad, it won't run the auth code Auth::guard('api')->id;

Is there a way to set a demo account so that it can execute the Auth code?

yaofong avatar Aug 17 '17 17:08 yaofong

Hey,

I'm not the expect on this, but thinking it's possibly a middleware issue?

I updated the repo a few days ago to add web middleware, but you should be able to override this using a custom ServiceProvider, and maybe add the api group:

  • http://sketchpad.davestewart.io/sketchpad/run/help/docs/setup/middleware

Another thought, it could be that Sketchpad isn't passing any token back with its request.

Did you get any errors you can show me?

I'd like to know more about this kind of thing myself :)

davestewart avatar Aug 17 '17 17:08 davestewart