-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Laravel Passport keys not available in Lambda #1667
Comments
Probably you should not try to store the private key in plain text in the lambda image, but instead load it via secrets manager into an env variable at runtime. |
Note that this is indeed a regression with the Bref bridge v2. It's because the BrefServiceProvider sets |
@GrahamCampbell Yeah, I did end up doing that. I was experimenting with an existing app when I noticed this behavior @mnapoli sorry if I'm not too knowledgeable with Bref v1, but was there any particular reason to put internals in a /tmp/storage path? |
@Rezrazi anything outside |
Please remember that lambda |
I followed the documentation for Laravel Passport setup. I think the documentation isn't clear or the solution for this still work in progress. My setup (as described in docs): # serverless.yml
package:
patterns:
- ...
# Exclude the 'storage' directory
- '!storage/**'
# Except the public and private keys required by Laravel Passport
- 'storage/oauth-private.key'
- 'storage/oauth-public.key' On |
Thanks for sharing the workaround! If you have the time for a pull request (https://github.com/brefphp/bref/blob/master/docs/laravel/passport.mdx) that would be awesome! |
I don't know if the behavior I observed is expected. Maybe on deploy |
Ideally it should copy the files, yes. But that's not implemented right now, so in the meantime mentioning the trick in the documentation is the best option I think. |
@mnapoli Please let me know if you've discovered a method to copy any file located in
|
Description:
Having Passport installed, and following the instructions described here https://bref.sh/docs/laravel/passport
I'm unable to get Passport working, throwing an exception:
Invalid key supplied
Investigation so far:
How to reproduce:
The text was updated successfully, but these errors were encountered: