How to Add an Authentication Screen for Server Communication in a Monday.com Integration App?

Does anyone know how to add an authentication screen for server communication when developing an integration app for Monday.com? I would like it to look like the image attached below. Please share your information.

Hello there @dydzm and welcome to the community!

I hope you like it here :muscle:

You can use the authorization URL of your integration feature as shown here to add such a screen to your flow :smile:

Cheers,
Matias

I haven’t tested this yet but believe the following approach should work:

You can set an authentication endpoint in your integration feature as shown below.

At your endpoint, you’ll receive a token in the query parameter. You can extract the userId and backToURL from the token like this

const { userId, backToUrl } = jwt.verify(
   token,
   MyMondaySigningSecret
 )

Next, you can render your own authentication page, authorise the user, and maintain a mapping between the Monday userId and your application session token. After that, redirect the user back to the integration template with -

async function customAuthController(req, res) {
 # you customer code goes here
 return res.redirect(backToUrl)
}

One thing to note is that the redirection may only work for a limited period, so it’s important to check the expiry time of the token.

Give it a try and let me know if you need any help.