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

[SDK-1694] Camel case props #22

Merged
merged 7 commits into from
May 29, 2020
Merged

[SDK-1694] Camel case props #22

merged 7 commits into from
May 29, 2020

Conversation

adamjmcgrath
Copy link
Contributor

@adamjmcgrath adamjmcgrath commented May 29, 2020

Description

client_id -> clientId
redirect_uri -> redirectUri
max_age -> maxAge

I've also improved the errors that come from the get token methods (to match the errors from the login methods). And added some info on handling recoverable errors to EXAMPLES.md

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@adamjmcgrath adamjmcgrath added medium This PR may require moderate effort to action, or contains many changes to review CH: Breaking Change PR contains breaking changes without a major version bump labels May 29, 2020
@adamjmcgrath adamjmcgrath requested a review from a team May 29, 2020 09:39
@@ -4,7 +4,7 @@ import withAuthenticationRequired from '../src/with-login-required';
import { render, screen, waitFor } from '@testing-library/react';
import { Auth0Client } from '@auth0/auth0-spa-js';
import Auth0Provider from '../src/auth0-provider';
import { mocked } from 'ts-jest';
import { mocked } from 'ts-jest/utils';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix warning from ts-jest

@@ -9,6 +9,13 @@ module.exports = {
],
testURL: 'https://www.example.com/',
testRegex: '/__tests__/.+test.tsx?$',
globals: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage get's messed up when you transpile to es5 in the tests microsoft/TypeScript#13029

getIdTokenClaims: (opts): Promise<IdToken> =>
client.getIdTokenClaims(opts),
loginWithRedirect: (opts): Promise<void> =>
client.loginWithRedirect(opts),
client.loginWithRedirect(toAuth0LoginRedirectOptions(opts)),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to change to redirectUri in the loginWithRedirect options too

src/utils.tsx Show resolved Hide resolved
EXAMPLES.md Outdated Show resolved Hide resolved
@adamjmcgrath adamjmcgrath merged commit 10fbc9d into master May 29, 2020
@adamjmcgrath adamjmcgrath deleted the camel-case-props branch May 29, 2020 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Breaking Change PR contains breaking changes without a major version bump medium This PR may require moderate effort to action, or contains many changes to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants