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

prep for auth-js 6.0 upgrade #191

Closed
wants to merge 8 commits into from
Closed

Conversation

jaredperreault-okta
Copy link
Contributor

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Adding Tests
  • Build related changes
  • CI related changes
  • Documentation changes
  • Other... Please describe:
    Requires min version for auth-js of 5.3.1

What is the current behavior?

Issue Number: OKTA-457552

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Reviewers

src/Security.tsx Outdated
&& process.env.SKIP_VERSION_CHECK !== '1') {
const err = new AuthSdkError(`Passed in oktaAuth is not compatible with the SDK, okta-auth-js version ${process.env.AUTH_JS_MAJOR_VERSION}.x is the current supported version.`);
return <OktaError error={err} />;
if (oktaAuth && oktaAuth._oktaUserAgent) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This check will miss any version that does not have _oktaUserAgent (below 5.3.1). Maybe we can use a warn instead of throwing an error, so it won't break.

src/Security.tsx Outdated
@@ -87,11 +83,22 @@ const Security: React.FC<{
return <OktaError error={err} />;
}

if (oktaAuthMajorVersion !== process.env.AUTH_JS_MAJOR_VERSION
if (oktaAuth) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: oktaAuth is checked in line 76, no need to check it again.

eng-prod-CI-bot-okta pushed a commit that referenced this pull request Jan 11, 2022
OKTA-457552
<<<Jenkins Check-In of Tested SHA: 5a004af for eng_productivity_ci_bot_okta@okta.com>>>
Artifact: okta-react
Files changed count: 9
PR Link: "#191"
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.

3 participants