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

When switching to RS256 nothing works. #278

Closed
UUSR opened this issue May 13, 2023 · 4 comments
Closed

When switching to RS256 nothing works. #278

UUSR opened this issue May 13, 2023 · 4 comments

Comments

@UUSR
Copy link

UUSR commented May 13, 2023

I switched to RS256 as stated in the description

JWT_AUTH_ALGORITHM

The jwt_auth_algorithm allows you to modify the signing algorithm.

I get errors:

<br />

<b>Warning</b>: openssl_sign(): supplied key param cannot be coerced into a private key in <b>C:\scripts.uusr.tk\wp-content\plugins\jwt-authentication-for-wp-rest-api\includes\vendor\firebase\php-jwt\src\JWT.php</b> on line <b>237</b><br />

<br />

<b>Fatal error</b>: Uncaught DomainException: OpenSSL unable to sign data in C:\OpenServer\domains\scripts.uusr.tk\wp-content\plugins\jwt-authentication-for-wp-rest-api\includes\vendor\firebase\php-jwt\src\JWT.php: 239

Stack trace:

#0 \scripts.uusr.tk\wp-content\plugins\jwt-authentication-for-wp-rest-api\includes\vendor\firebase\php-jwt\src\JWT.php(202): Firebase\JWT\JWT: :sign()

#1 \scripts.uusr.tk\wp-content\plugins\jwt-authentication-for-wp-rest-api\public\class-jwt-auth-public.php(172): Firebase\JWT\JWT: :encode()

#2 \scripts.uusr.tk\wp-includes\rest-api\class-wp-rest-server.php(1181): Jwt_Auth_Public-&gt;generate_token()

#3 \scripts.uusr.tk\wp-includes\rest-api\class-wp-rest-server.php(1028): WP_REST_Server-&gt;respond_to_request()

#4 \scripts.uusr.tk\wp-includes\rest-api\class-wp-rest-server.php(442): WP_REST_Server-&gt;dispatch()

#5 \scripts.uusr.tk\wp-includes\rest-api.php(410): WP_REST_Server-&gt;serve_request( in <b>\scripts.uusr.tk\wp-content\plugins\jwt-authentication-for-wp-rest-api\includes\vendor\firebase\php-jwt\src\JWT.php</b> on line <b>239</b><br />

@LadisWasharum
Copy link

Were you able to come up with a solution?

@UUSR
Copy link
Author

UUSR commented Jul 29, 2023

Unfortunately no.

@LadisWasharum
Copy link

Hey @UUSR, I solved this today. If you still want to use this plugin/method, here: #280

@Tmeister
Copy link
Owner

Tmeister commented Sep 3, 2023

Closing this.

@Tmeister Tmeister closed this as completed Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants