feat(auth): Add Authorization Code Flow and new Keycloak recipes with new video tutorials (#4234)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
This commit is contained in:
IbrahimandAlireza authored and GitHub committed 2024-07-09 14:33:37 -04:00
1 parent 998302eb85
commit aefa6d94df
81 files changed
+6525 -471

No files matched your search

+7 -5
View File
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
function CallbackPage({ userManager, onRedirectSuccess }) {
@@ -6,10 +6,12 @@ function CallbackPage({ userManager, onRedirectSuccess }) {
throw new Error(error);
};
userManager
.signinRedirectCallback()
.then(user => onRedirectSuccess(user))
.catch(error => onRedirectError(error));
useEffect(() => {
userManager
.signinRedirectCallback()
.then(user => onRedirectSuccess(user))
.catch(error => onRedirectError(error));
}, [userManager, onRedirectSuccess]);
return null;
}