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

Convert OAuth2-style errors to StytchError equivalent #315

Merged
merged 2 commits into from
Apr 16, 2024

Conversation

logan-stytch
Copy link
Contributor

Fixes #314

The issue is that the M2M token endpoint conforms to OAuth2-expected field names, which meant they didn't match our existing names from a StytchError -- since an end-user wouldn't particularly care about this difference when using the backend SDK, this PR simply converts the field names from the OAuth2 names to our StytchError names.

Testing

I created a simple script locally to create an M2M client and then try to get a token using a bogus client_secret.
Excerpt below:
image

@logan-stytch logan-stytch changed the title Logan/m2m token Convert OAuth2-style errors to StytchError equivalent Apr 16, 2024
@logan-stytch logan-stytch merged commit 7242a8e into main Apr 16, 2024
9 checks passed
@logan-stytch logan-stytch deleted the logan/m2m-token branch April 16, 2024 18:58
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

Successfully merging this pull request may close these issues.

StytchError missing fields
2 participants