Skip to content
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

Unable to create personal access tokens when using hashed client secrets #1252

Closed
aaronhuisinga opened this issue May 7, 2020 · 2 comments · Fixed by #1260
Closed

Unable to create personal access tokens when using hashed client secrets #1252

aaronhuisinga opened this issue May 7, 2020 · 2 comments · Fixed by #1260
Labels

Comments

@aaronhuisinga
Copy link

  • Passport Version: 9.0.1
  • Laravel Version: 7.10.3
  • PHP Version: 7.4.3
  • Database Driver & Version: MySQL 8.0.19

Description:

After upgrading to Passport v9, enabling hashed client secrets (Passport::hashClientSecrets()), and running the command to hash the secrets in the database, we are unable to create Personal Access Tokens.

When using the included Vue component, we receive a 500 (Client authentication failed) when trying to create a new Personal Access Token.

Strangely, even after hashing the client secrets in the database, removing the Passport:hashClientSecrets() method from the AppServiceProvider fixes the issue and allows Personal Access Tokens to be created.

@driesvints
Copy link
Member

Hey @aaronhuisinga. We've released v9.1.0 which fixes this.

Unfortunately we weren't able to fix this without introducing a new breaking change. If you already hashed the secret of your personal access client in production you'll have to generate a new one and set its client id and secret in your .env file. Here's steps on how to do that: https://github.com/laravel/passport/blob/9.x/UPGRADE.md#personal-access-clients

We're very sorry about this. Unfortunately we didn't caught this in the original pull request that was sent in.

@aaronhuisinga
Copy link
Author

Thanks for the fix @driesvints! Glad it was caught early, and hopefully before too many people updated to v9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants