Dynamic Help Center Login Link | Community
Skip to main content

Hi , I am a junior Developer and I have sat up Intercom in my website which has multiple users with different groups or companies so to say, Right now the Integration inside my website is working as it should be, the users i got them from my backend and pass the infor useing tkoen to my Frontend and the audiences is working fine, 
so i get to know the user and everything from my own website without asking him to sign in, he already did in my app. 
right now if he clicked a link for Intercom help center which is open in helpcenter there is no way that he could see the article untill he logs in, "Unable to load this article, you may need to sign in first" with the button url.
and the Login link which i should be doing is something like this , 
https://mycompany.login/{group}/
the group part shoud be dynmaic and should be passed from my frontend, how to do it please if you could help.
also after I login successfluy using my link I want to redirect to the same Intercomaticle  i suppose i could do this from my log in page but what if the user entered another article will he/she be able to still be logged in. 

I hope i have ilustraed my question in a good way. "detailed anwers are highly appreaciated"

@Sego55 I will take a crack at it, and wish it would be helpful

I think the best way to handle this is using JWT single sign-on (SSO). That way, your users don’t have to log in again when opening Intercom Help Center articles. Here’s how it works:

1. JWT SSO, Backend generates a signed JWT with:

  • emailuser_id

  • group (dynamic per user)

  • redirect_to (the article URL)

  • iat / exp timestamps, issued at and expiry

2. FE redirect: When a user clicks a Help Center link, call your backend to get the JWT, then redirect them like this:

window.location.href = `https://app.intercom.com/login/jwt?jwt=${GENERATED_JWT}`;


Intercom will log them in using the JWT, send them to the article, and keep them logged in for the rest of their session. So even if they click another article or belong to a different group, they won’t have to log in again.
 

 

By this, you won’t need to hardcode /login/{group}/ links. So your backend handles the dynamic group, and redirect_to makes sure they land on the right article.
 

This should cover all your points: dynamic group login, redirect to the article, and 0 repeated logins/auth.
And again, hope it would help! And if the issue persists, probably best to reach out to the intercom team directly as they would be able to see the errors on the backend. 


Hi Joseph,

 

thanks for the heads up. Coming from zendesk this is very similiar to how we login users into zendesk (JWT, redirect).

 

You mention app.intercom.com/login … where do I find documentation about this?

 

You mention “When a (unauthenticated) user clicks a Help Center link, call your backend to get the JWT”. How would you intercept such a click in the Help Center on intercom.com?

 

Thanks!

 

Cheers,

Alex

 


@Joseph S. Thanks for your  response , I was doing the sane thing as you said expect the sso , and the custom domain, now it passes the cookies to the helper center and works fine except for the part that I opened the help center in incognito, and log in then dunno how to redirect back to the same article i was in , 

thanks in advance, i hope to get more detailed answer about the redirect irl and where do i use in my code do i have to use api for intercom to do such thing