Zitadel immediately redirects to Google when trying to log in, how to stop?
For some reason when I try to open Zitadel login screen from our app, Zitadel redirects me to Google login without asking how I actually want to login or giving me any opportunity to create a new user etc. Google login is literally the first thing I see. How can I stop this?
I am using Zitadel v2.71.6
7 Replies
Hi @wlinna, I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question.
Answer
Based on the sources, this is the current intended behavior in ZITADEL (1) . When a user has previously linked their account with Google, ZITADEL will automatically redirect to Google login to complete the authentication flow .
This behavior occurs because ZITADEL uses what the user has used in their last session . Once a user has authenticated via Google, they will continue to be redirected to Google for future logins .
This is not considered a bug but the current intended behavior . However, there is an existing GitHub issue tracking the problem of an external IdP potentially not being available: https://github.com/zitadel/zitadel/issues/6466 .
To work around this behavior, you may need to consider building your own custom login UI using ZITADEL's Session API (2) , which provides developers with a straightforward method to manage user sessions within their applications . The Session API can be used instead of OpenID Connect or SAML to authenticate users by building your own custom login user interface .
For external identity provider handling in custom login UIs, you can refer to the documentation on handling external logins (3) .
To learn more, see the sources I considered:
[1] [Bug]: Trying to login as regular user forces me to use google auth
[2] Log users into your application with different authentication options
[3] Handle External Logins in a Custom Login UI
Feel free to tag @Ask Inkeep with additional questions.
Got it. Tagging @Rajat for additional help.
Bad bot. This is different. I am not even given an opportunity to choose my user because the first thing I see is Google's login page. What if I want to log in as someone else / register a new user?
Hello @Rajat , have you had time to check this issue? It is very concerning that there is no way to choose the user in Zitadel, because the user is redirected to Google even before choosing the user.
I've tried checking "scope" settings if they could be used to change this behavior, but none of them seem applicable
hey @wlinna are you on custom UI? Are you self hosted?
Self-hosted yes, but I don't use the custom UI
hello @wlinna can you check what scopes are you passing in the auth request? are you able to reproduce this issue on an incognito window?
Can you share here a network trace?
- https://help.zitadel.com/steps-to-record-a-network-trace-har-file
Steps to record a network trace (HAR file)
A network trace is a detailed log of the communication between your device and a server. In the context of authentication or login errors, it records the requests sent and the responses received during the login process. Support teams use it to identify where the process fails — for example, whether the issue is due to a network problem, a mis...
Hello and thanks for getting in touch. However, I am on vacation for the next 2 weeks. After that I can report the scopes.
However, I will not have access to the computer where the problem occurred for the rest of the year since I am out of country for a while. I might be able reproduce the problem again since it has happened to some of my colleagues too and is not a rare occurrence
hello @wlinna sounds good, feel free to reach out to us and we will take a look at the network trace, thanks!