Skip to content

Commit

Permalink
Merge pull request #1000 from nickgros/SWC-6871
Browse files Browse the repository at this point in the history
SWC-6871 - fix reset2FA link to point to OneSage
  • Loading branch information
jay-hodgson authored Jun 11, 2024
2 parents 95c11ff + 69785a3 commit 832e003
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/synapse-react-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "synapse-react-client",
"version": "3.2.20",
"version": "3.2.21",
"private": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react'
import { Box, Link } from '@mui/material'
import FullWidthAlert from '../FullWidthAlert/FullWidthAlert'
import { UseLoginReturn } from '../../utils/hooks'
import { UseLoginReturn, useOneSageURL } from '../../utils/hooks'
import { TwoFactorAuthErrorResponse } from '@sage-bionetworks/synapse-types'
import UsernamePasswordForm from './UsernamePasswordForm'
import AuthenticationMethodSelection from './AuthenticationMethodSelection'
import OneTimePasswordForm from './OneTimePasswordForm'
import { OAuth2State } from '../../utils'
import { useOneSageURL } from '../../utils/hooks/useOneSageURL'

type Props = {
ssoRedirectUrl?: string
Expand Down Expand Up @@ -36,6 +35,9 @@ type Props = {

export default function LoginForm(props: Props) {
const defaultRegistrationUrl = useOneSageURL('/register1')
const defaultTwoFactorAuthResetUrl = useOneSageURL(
'/reset2FA?twoFAResetToken=',
)
const {
ssoRedirectUrl,
ssoState,
Expand All @@ -53,7 +55,7 @@ export default function LoginForm(props: Props) {
hideForgotPasswordButton,
twoFactorAuthResetIsSuccess,
twoFactorAuthResetIsPending,
twoFactorAuthResetUri = `${window.location.origin}/reset2FA?twoFAResetToken=`,
twoFactorAuthResetUri = defaultTwoFactorAuthResetUrl.toString(),
} = props

return (
Expand Down

0 comments on commit 832e003

Please sign in to comment.