mirror of
https://github.com/plankanban/planka.git
synced 2025-07-19 13:19:44 +02:00
feat: OIDC with PKCE flow (#491)
This commit is contained in:
parent
e254443272
commit
6941500c7b
24 changed files with 805 additions and 22 deletions
|
@ -1,5 +1,6 @@
|
|||
import isEmail from 'validator/lib/isEmail';
|
||||
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
||||
import { useAuth } from 'react-oidc-context';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
@ -48,6 +49,7 @@ const createMessage = (error) => {
|
|||
|
||||
const Login = React.memo(
|
||||
({ defaultData, isSubmitting, error, onAuthenticate, onMessageDismiss }) => {
|
||||
const auth = useAuth();
|
||||
const [t] = useTranslation();
|
||||
const wasSubmitting = usePrevious(isSubmitting);
|
||||
|
||||
|
@ -171,6 +173,9 @@ const Login = React.memo(
|
|||
disabled={isSubmitting}
|
||||
/>
|
||||
</Form>
|
||||
<Form.Button type="button" onClick={() => auth.signinRedirect()}>
|
||||
Log in with SSO
|
||||
</Form.Button>
|
||||
</div>
|
||||
</div>
|
||||
</Grid.Column>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue