Skip to content

Commit

Permalink
feat(sso): magic link data polling for exchange only accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
TheLeoB committed Dec 9, 2021
1 parent e363d08 commit f964268
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -732,10 +732,7 @@ export default ({ api, coreSagas, networks }) => {
yield put(actions.auth.analyticsAuthorizeVerifyDeviceSuccess())
}
} catch (e) {
if (
(e.status === 401 && e.confirmation_required) ||
(e.status === 409 && e.exchange_only_login)
) {
if (e.status === 401 && e.confirmation_required) {
yield put(actions.auth.authorizeVerifyDeviceSuccess(e))
} else if (e.status === 409 && e.request_denied) {
yield put(actions.auth.authorizeVerifyDeviceFailure(e))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const pollForSessionFromAuthPayload = function* (api, session, n = 50) {
try {
yield delay(2000)
const response = yield call(api.getMagicLinkData, session)
if (prop('wallet', response)) {
if (prop('wallet', response) || prop('exchange', response)) {
yield put(actions.auth.setMagicLinkInfo(response))
yield call(parseMagicLink)
return true
Expand Down

0 comments on commit f964268

Please sign in to comment.