-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1544 from tidepool-org/UPLOAD-936-native-sso
[UPLOAD-936] [UPLOAD-1005] [UPLOAD-1023] native oauth login
- Loading branch information
Showing
18 changed files
with
318 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from 'react'; | ||
import styles from '../../styles/components/LoggedOut.module.less'; | ||
import { useDispatch } from 'react-redux'; | ||
|
||
import actions from '../actions/'; | ||
const asyncActions = actions.async; | ||
import { pages } from '../constants/otherConstants'; | ||
import * as actionSources from '../constants/actionSources'; | ||
import logo from '../../images/Tidepool_Logo_Light x2.png'; | ||
|
||
const remote = require('@electron/remote'); | ||
const i18n = remote.getGlobal('i18n'); | ||
|
||
export const LoggedOut = () => { | ||
const dispatch = useDispatch(); | ||
|
||
const handleReturn = (e) => { | ||
e.preventDefault(); | ||
dispatch(asyncActions.setPage(pages.LOGIN, actionSources.USER)); | ||
}; | ||
|
||
return ( | ||
<div className={styles.loggedOutPage}> | ||
<div className={styles.logoWrapper}> | ||
<img className={styles.logo} src={logo} /> | ||
</div> | ||
<hr className={styles.hr} /> | ||
<div className={styles.heroText}> | ||
{i18n.t('You have been signed out of your session.')} | ||
</div> | ||
<div className={styles.explainer}> | ||
{i18n.t( | ||
'For security reasons, we automatically sign you out after a certain period of inactivity, or if you\'ve signed out from another browser tab.' | ||
)} | ||
</div> | ||
<div className={styles.explainer}> | ||
{i18n.t('Please sign in again to continue.')} | ||
</div> | ||
<form className={styles.form}> | ||
<div className={styles.actions}> | ||
<button | ||
type="submit" | ||
className={styles.button} | ||
onClick={handleReturn} | ||
> | ||
{i18n.t('Return to Login')} | ||
</button> | ||
</div> | ||
</form> | ||
</div> | ||
); | ||
}; | ||
|
||
export default LoggedOut; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.