mirror of
https://github.com/tinyauthapp/tinyauth.git
synced 2026-08-15 14:43:31 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4db1b33034 | ||
|
|
f6637c0f65 |
@@ -31,7 +31,7 @@ export const ContinuePage = () => {
|
||||
const searchParams = new URLSearchParams(search);
|
||||
const screenParams = useScreenParams(searchParams);
|
||||
const redirectUri = screenParams.redirect_uri;
|
||||
const isAppLogin = screenParams.login_for === "app";
|
||||
const isAppLogin = screenParams.login_for === "app" || !screenParams.login_for;
|
||||
const compiledParams = (() => {
|
||||
const params = searchParamsFromObject(screenParams).toString();
|
||||
if (params.length > 0) {
|
||||
|
||||
@@ -77,7 +77,7 @@ export const LoginPage = () => {
|
||||
|
||||
const [isOauthAutoRedirect, setIsOauthAutoRedirect] = useState(
|
||||
providers.find((provider) => provider.id === oauth.autoRedirect) !==
|
||||
undefined && screenParams.redirect_uri !== undefined,
|
||||
undefined && (screenParams.redirect_uri || screenParams.oidc_ticket),
|
||||
);
|
||||
|
||||
const oauthProviders = providers.filter(
|
||||
@@ -174,8 +174,7 @@ export const LoginPage = () => {
|
||||
!auth.authenticated &&
|
||||
isOauthAutoRedirect &&
|
||||
!hasAutoRedirectedRef.current &&
|
||||
screenParams.redirect_uri &&
|
||||
screenParams.login_for
|
||||
(screenParams.redirect_uri || screenParams.oidc_ticket)
|
||||
) {
|
||||
hasAutoRedirectedRef.current = true;
|
||||
oauthMutate(oauth.autoRedirect);
|
||||
@@ -186,8 +185,8 @@ export const LoginPage = () => {
|
||||
hasAutoRedirectedRef,
|
||||
oauth.autoRedirect,
|
||||
isOauthAutoRedirect,
|
||||
screenParams.login_for,
|
||||
screenParams.redirect_uri,
|
||||
screenParams.oidc_ticket
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user