Hi there - I'm using Auth0 to authenticate my user...
# gooddata-platform
m
Hi there - I'm using Auth0 to authenticate my users. In order to ensure users are authenticated whenever seeing a dashboard, it had been previously recommended to redirect the iframe embed URL through the SAML authentication and then redirect back to the embed URL using redirectstate=. The trouble with this process is that all query parameters are stripped, which means I can't configure essential variables like shownavigation=true. Those values are stripped on the redirect. Luckily Auth0 has thought of this and created something called state parameters. I followed Auth0's documentation and was able to get query parameters to carry through the redirect for URLs in my product. However, I cannot get the parameters to carry through for embedded URLs from Good Data. Do you have any tips on getting this to work? Here is a sample of my code (with the IDs covered for security). The embed code below shows an embedded dashboard with zero query parameters, which means things aren't displaying properly (i.e. navigation is hidden).
b
Hi Mitchel, in the dashboard code, you are using the RelayState parameter correctly, however the URL of the dashboard with all it's parameters need to be URL encoded for it to work.
However, also looking at the URL, does it work for you like this without the auth0 part? Because the URL ends with disabladEditMode=true (careful about the typo) and then there are additional parameters after the frameborder=""
m
Ooops, yeah you are right @Boris. That is some messy code. I must have pasted additional parameters at the end haphazardly. The url does work, but it ignores those extra parameters. Do you have any documentation on URL encoding? How would I do that?
b
Hi Mitchel, you can use any online tool to encode the url for the testing phase (it’s basically just replacing certain characters with strings) i.e.:https://amp.urlencoder.org/
m
Got it, well that was a simple solution. Sorry for not finding it myself. It's working now, and I also cleaned up the misplaced parameters. Thanks for your help @Boris!