-
Notifications
You must be signed in to change notification settings - Fork 79
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
Conversation
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) { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Requires min version for
auth-js
of 5.3.1What is the current behavior?
Issue Number: OKTA-457552
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Reviewers