brefphp / laravel-bridge

Package to use Laravel on AWS Lambda with Bref
https://bref.sh/docs/frameworks/laravel.html
MIT License
314 stars 63 forks source link

Issue with Passport #30

Closed chancemcox closed 3 years ago

chancemcox commented 3 years ago

I setup an app and am working with passport.

when going to the url

https://dev-patient-api.docsink.com/oauth/authorize?client_id=1301073282&redirect_uri=https://dev-biosense.bots.docsink.com/callback&response_type=code

it sends me to the login screen, once i login it redirects me to

https://icqkm1pf1d.execute-api.us-east-1.amazonaws.com/oauth/authorize?client_id=1301073282&redirect_uri=https%3A%2F%2Fdev-biosense.bots.docsink.com%2Fcallback&response_type=code

with body {"message":"Forbidden"}

i have Illuminate\Support\Facades\URL::forceRootUrl(env('APP_URL')); in the boot() function of app/Providers/AppServiceProvider.php so im unsure why its forwarding to the api-gateway url.

when i return to https://dev-patient-api.docsink.com/oauth/authorize?client_id=1301073282&redirect_uri=https://dev-biosense.bots.docsink.com/callback&response_type=code it forwards me to the right place because im already logged in.

Any ideas what i need to do to fix the incorrect redirect?

mnapoli commented 3 years ago

Hi, I think that's related to https://github.com/brefphp/bref/issues/535

chancemcox commented 3 years ago

That was it. thanks