Skip to main content

Where to put app settings and how to authenticate on settings page?

  • November 29, 2022
  • 27 replies
  • 1826 views

I’m building an integration and have the need for a settings page for the integration. Where do you recommend that settings page is added?

I noticed there’s an Account Settings View that can be added to an app. I was trying to add a settings page there using a custom URL from my server, but am having issues with authentication. I noticed that JWT is not used for that page, but instead a session token is passed to the page. Trying to use the Monday SDK and setting this token with monday.setToken(sessionToken) leads to a “Not Authenticated” response once I try and make an API call with monday.api(MY_QUERY).

If you recommend I use the Account Settings View for an apps settings, how should I authenticate with my server so I only show the settings relevant to that user?

Another option I’ve seen is using a Board View, but then the page is tied to a board, which doesn’t seem to make sense from an app settings perspective, since the integration isn’t board-specific.

27 replies

basdebruin
  • Community Expert
  • November 29, 2022

hi @oalbrecht

I would normally say: use a boardview.

But that is until I discovered this Account Settings View. Does anybody know what that is? Where will the user / admin add this view. From the name I guess it is outside the board, somewhere in the admin area?

For me this is a complete new view and I can’t find any information on it.


rob
Forum|alt.badge.img
  • monday.com Partner
  • November 30, 2022

That’s a news for me too. It would be really useful to check General Caster usage.
Is there any documentation about it somewhere?


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • November 30, 2022

Hello there everyone,

We are working on the documentation on the new Account Settings View, which will be available very soon!

Sorry for the delay on it!

Cheers,
Matias


basdebruin
  • Community Expert
  • November 30, 2022

hi @Matias.Monday

The setup looks very straight forward to me :). The only thing I was wondering is where does the view appear in the UI? Can you shine a light on that or is it too early?


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • December 1, 2022

Hello @basdebruin!

Yes! The user has to click on their profile picture (or initials), then on the admin section, then on the apps section and then on the three dots next to the app. In there, there is an option that says “Settings”. That is where this view will be shown.

Cheers,
Matias


rob
Forum|alt.badge.img
  • monday.com Partner
  • December 1, 2022

@Matias.Monday Any ETA?


  • Author
  • Participating Frequently
  • December 1, 2022

@Matias.Monday Do you know if there will be a way to authenticate users (e.g. JWT) on the settings page?

Also, it seems like this settings page is currently pretty hidden from users. It took me a good amount of searching to find it. Not sure if it’s on the roadmap, but it would be great if it were more obvious to users where to find their settings.

Thanks!


rob
Forum|alt.badge.img
  • monday.com Partner
  • December 2, 2022

+1 on this.
@Matias.Monday While waiting for the documentation, can you tell us how to use the sessionToken?


  • Author
  • Participating Frequently
  • December 2, 2022

I was able to figure out how to authenticate on the settings page. It works the same way as it does for board views and uses seamless authentication (more info here: Choosing an authentication method).


rob
Forum|alt.badge.img
  • monday.com Partner
  • December 4, 2022

Thank you, @oalbrecht
Anyone knows if there’s a way to use the sessionToken without the Monday SDK?


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • December 5, 2022

Here is the current documentation! @rob @basdebruin @oalbrecht


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • December 6, 2022

Hello @rob!

If you want to get a token to be able to use monday’s API to get information from the account/user, you will need to use the SDK. There is no token in the payload.

You could also use OAuth but at this screen it is not recommended at this screen.

Cheers,
Matias


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • December 20, 2022

We have moved the documentation, so here is the updated link 🙂


rob
Forum|alt.badge.img
  • monday.com Partner
  • February 15, 2023

@oalbrecht @basdebruin Did you find a way to seamlessly authenticate to the API in the app settings view?
As far as I can see the sessionToken passed in GET to the page contains only basic information:

{
    "client_id": "abc",
    "user_id": 123,
    "account_id": 456,
    "slug": "omnidea-dev",
    "app_id": 789,
    "app_version_id": 987,
    "install_id": -2,
    "is_admin": true,
    "is_view_only": false,
    "is_guest": false,
    "user_kind": "admin"
  }

The only solutions suggested by monday is to perform a OAuth2 process, which requires the user to accept the permissions request. Not so handy.


  • Author
  • Participating Frequently
  • February 16, 2023

@rob I used the following code to get the session token:

let monday = window.mondaySdk();
monday.get("sessionToken").then(res => {
     console.log('Your token:', res.data);
});

I verified this JWT using the monday.com client secret on my server. I just needed the account id for my use case, which it contained, so that was sufficient.


rob
Forum|alt.badge.img
  • monday.com Partner
  • February 23, 2023

Thank you, @oalbrecht, but the sessionToken passed via GET to the app settings view cannot be used to authenticate unfortunately.


  • Participating Frequently
  • July 17, 2023

@rachelatmonday

Would you be able to document the contents/structure of the JWT payload from the SDK? it seems the payload is undocumented. Just trying to make it easier for anyone needing to look it up.


dvdsmpsn
Forum|alt.badge.img+1
  • Participating Frequently
  • July 18, 2023

Meantime, drop the JWT token into https://jwt.io to inspect the payload 😉


  • Participating Frequently
  • July 18, 2023

Well yes, my point was it’s not in the documentation that I can find.


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • July 18, 2023

Thanks @anon29275264! I’ve added the request to the backlog 🙏


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • December 4, 2023

Hey @anon29275264,

It has been a while, but I just wanted to follow up on this request! I heard back from the team who said this unfortunately isn’t possible as the payload body is not a public API.

Best,
Rachel


  • Participating Frequently
  • December 4, 2023

Yet… we’re required to use the payload in the session token JWT within our backend to get the account ID & user ID to verify the JWT is actually from the account & user the request is being made for! Otherwise we’re permitting request forging from one account to another if we use the session token for authentication but don’t utilize data in the payload of the JWTs to match the JWT is actually valid for the request being made!

I’m calling BS on that “its not public” if we have to use the data in it to properly secure customer data.


dvdsmpsn
Forum|alt.badge.img+1
  • Participating Frequently
  • December 4, 2023

If the JWT is passed around in http requests, of course it’s public. You only have to find one to see what’s in it.

Properly documenting what’s valid within the JWT is the next step.


  • Participating Frequently
  • December 4, 2023

Of course its public since we can access it print its contents to console, and access it through a public API.

Since there is an expectation we use the contents of the JWT for something (its not just a random string signed with our client secret) then the contents are part of a public API by definition. If there was never a reason to use the contents of it, i could see it being called “private” (in the sense it could change at any time without warning). But thats not the case.


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • December 4, 2023

Essentially we can’t guarantee to support the same structure. Is there specific data that you need from the token?

@anon29275264 @dvdsmpsn