appsmith-docs icon indicating copy to clipboard operation
appsmith-docs copied to clipboard

JWT doc functionality questions

Open bcspragu opened this issue 3 years ago • 0 comments

Hi there!

I've been setting up an AppSmith deployment authenticated with SSO and going through the JWT documentation, and I had a few questions:

  1. Where does the <<ENV_VARIABLE>> syntax work?

From the docs:

The environment variable APPSMITH_USER_OAUTH2_ACCESS_TOKEN stores access token. You can read the value of the access token by using it in between the angular braces<<>>.

I didn't see APPSMITH_USER_OAUTH2_ACCESS_TOKEN appear anywhere in the appsmithorg/appsmith codebase, and using double angle brackets in a datasource or query just passed along the string as a literal. Wrapping that in double curly brackets, e.g. {{<<APPSMITH_USER_OAUTH2_ACCESS_TOKEN>>}} produces null, but so does putting any invalid identifier between {{ }}.

  1. Is {{appsmith.user.idToken}} supposed to be functional?

From the docs:

You can read the value of an id token in your APIs/Queries by using a mustache sign {{}}.

{{appsmith.user.idToken}}

When I use {{appsmith.user.idToken}}, I get {}, meaning that idToken is an empty object. Looking through the codebase, the only time idToken appears is here, where it's set to an empty map, which matches my experience. I have SSO configured through Google and that works fine.

bcspragu avatar Mar 30 '22 22:03 bcspragu