Skip to main content
Answered

Automatic redirection to our website login

  • November 23, 2023
  • 8 replies
  • 290 views

Hey,

We are using Intercom on our website. Everything works fine if a user clicks on an intercom link while already logged into our website. However, if they are not logged in when they try to click an intercom link, it shows a ‘you must be logged in’ error and a link back to our login page. Is there a way of configuring things so that instead, it automatically detects a user is not logged in and redirects to our login page, without the user having to click anything?

Best answer by Milan

Hello @philvigus - in order to help you out I’d need some more info. 

When you say “Intercom link” what do you mean exactly? As from what I read when you say what message appears it sounds like a message on Intercom hosted Help Center (using Intercom Articles), sounds like your Help Center is only set for Users… 

Can you please share more info and perhaps some screenshots? Thanks!

View original
Did this topic help you find an answer to your question?

8 replies

Diana Tripac
Intercom Team
Forum|alt.badge.img+2
  • Senior Community Program Manager @Intercom
  • 151 replies
  • November 24, 2023

Hi @philvigus ,

I am looping in here one of our top Community Experts who are also Intercom Service Partners/ Consultants, hopefully, they will be able to advise 🙌 cc @Milan @Nathan Sudds 


Milan
Expert User ✨
Forum|alt.badge.img+5
  • Top Expert
  • 306 replies
  • Answer
  • November 27, 2023

Hello @philvigus - in order to help you out I’d need some more info. 

When you say “Intercom link” what do you mean exactly? As from what I read when you say what message appears it sounds like a message on Intercom hosted Help Center (using Intercom Articles), sounds like your Help Center is only set for Users… 

Can you please share more info and perhaps some screenshots? Thanks!


  • Author
  • New Participant
  • 2 replies
  • November 29, 2023

Hey Milan,

Thank you for your reply.

Yes, the help centre articles are set to only be accessible by Users, and that cannot be changed. What I’d like to implement is that when a Visitor tries to access a help centre article, they are automatically redirected to our login page. At the moment, they are sent to a page with a link to the login (this is just another intercom article with a static url in it), which adds an extra click for the user, and isn’t as good an experience for them. The ideal flow would be:

  1. Visitor attempts to access help centre article
  2. Visitor is automatically redirected to our log in
  3. When they successfully log in, they are redirected back to the article as a visitor

3 is something we can implement, but I don’t know if 1 and 2 can be done with interom?

We have several use cases for this:

  • We send help centre article links to our users in emails, and when they click on them they aren’t guaranteed to be logged in
  • If someone bookmarks a help centre article, they may not be logged in then next time they visit the page

Milan
Expert User ✨
Forum|alt.badge.img+5
  • Top Expert
  • 306 replies
  • November 29, 2023

@philvigus  thanks, and as I thought this is related to Articles. 

Unfortunately, there is nothing you can do as the mechanism is fully handled on Intercom side, you can not add any kind of script to those pages that could do this. 

We can just wishlist this as a potential new feature that can be turned off/on in the settings. 

 

@Diana Tripac is there a way to wishlist topics as we did in the previous community? 


Jacob Cox
Intercom Team
Forum|alt.badge.img+5
  • Sr. Technical Support Engineer
  • 441 replies
  • January 27, 2024

You can always add items to the community Wishlist here!


  • New Participant
  • 1 reply
  • January 30, 2024

Yes, you can achieve automatic redirection by implementing client-side logic in your web application. Use JavaScript to check the user's login status when they click an Intercom link. If not logged in, programmatically redirect them to the login page. That is my website link check out (Gloryshine) if you have any other issue reply me


Forum|alt.badge.img+1
  • Connector
  • 9 replies
  • May 23, 2024

Yes, you can set up your website to automatically redirect users to the login page if they are not logged in when they click on an Intercom link. You need to add a script to check if a user is logged in before allowing them to access the Intercom link. If they are not logged in, the script will redirect them to the login page automatically. This way, users won't see an error message or need to click a link to log in; they will be taken directly to the login page.

 

 

 

 


  • Author
  • New Participant
  • 2 replies
  • June 12, 2024

Thanks both for your suggestions. We have already implemented a process where we can change intercom URLs by ‘wrapping’ them. When a user clicks on the amended link:

  • They are initially sent to an endpoint on our app
  • This checks to see if they are logged in
  • If they are not logged in then they are redirected to our login page so they can log in
  • They are redirected back to the actual intercom link

The above works fine - the issue is with people who have direct links saved to intercom articles. Ideally we want them to be redirected from the intercom link to our app for authentication in the same way, but there doesn’t seem to be a way of implementing this redirect from within intercom


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings