Hello Guys :star2: I Have an issue regarding the ...
# gooddata-ui
n
Hello Guys 🌟 I Have an issue regarding the login in GoodData/ my web app. When i login to my web app and then login to Good Data in two different tabs in chrome my logins affect each other. So for example if i Login to my GoodData account in my hosted URL and then open a new tab with our GoodData URL and login with the same goodData account it authenticates me in my own hosted URL. If i then logout from my account in our GoodData url i get logged out in my hosted web-page as well. Same happens if i logout from my GoodData account in my hosted url, it logs me out in our GoodData url. Where does the app decide this authentication? is it in the constant file?
j
Hello Nicole! What is the URL of your GoodData platform, and what is the URL of your hosted application? Could you please provide both of those URLs?
n
Hello @Jiri Zajic 🌟 this is the URL of our GoodData platform: https://brandranalytics.on.gooddata.com/ and this is the URL for our hosted application: https://brandr-web.web.app/
j
Hello Nicole! I see that the URLs are different. I assume that the frontend app hosted at https://brandr-web.web.app/ connects and executes against https://brandranalytics.on.gooddata.com/ backend, right? This should be set in the
src/constants.js
file as you correctly pointed out. You should also check out
package.json
for
build-with-explicit-hostname
that sets
REACT_APP_SET_HOSTNAME
variable to
true
for the build process. Look for occurrences of
REACT_APP_SET_HOSTNAME
in the codebase to understand what's happening. Assuming there is only one shared session in your browser (same browser instance, two tabs), it should be enough to log in in either one (frontend app, or GoodData portal URL). Once you authenticate in one, the other will be authenticated as well. When you log out in one, the other will log out as well. The cookies (GDCAuthTT and GDCAuthSST) are shared on the domain level, so once you're authenticated in frontend app, you are also authenticated in GoodData portal, and vice versa. Once you log out from either one, you will be logged out in both.
Screen Shot 2022-05-25 at 22.32.00.png,Screen Shot 2022-05-25 at 22.33.24.png
n
Hello @Jiri Zajic thank you for giving me deeper understanding 🙏
👍 1