Skip to content

Commit

Permalink
improve login messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
devincowan committed Jan 10, 2024
1 parent d4a7dd2 commit 2efe1f5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/frontend/src/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,21 @@ export async function logIn(callback) {

const url = `${ENDPOINTS.authCuahsiCallback}${params}`
const resp = await fetch(url)

if (!resp.ok) {
console.log(resp.status, resp.statusText)
alertStore.displayAlert({
title: 'Error Logging In',
text: `We had difficulty logging you in. If you continue to encounter this issue, please contact [email protected].`,
type: 'success',
closable: true,
duration: 3
})
}

const json = await resp.json()
authStore.login(json)

// const userInfo = awaitw
const userinfo = await fetch(ENDPOINTS.userInfo, {
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit 2efe1f5

Please sign in to comment.