# How to Make a Customized Login Page in Perspective

**URL:** <https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027>\
**Category:** Ignition\
**Created:** [May 24, 2021, 3:23am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027 "2021-05-24T03:23:46Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_L](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Jay\_L](https://forum.inductiveautomation.com/u/Jay_L)\
**Post date:** [May 24, 2021, 3:23am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/1 "2021-05-24T03:23:47Z")

</div>

As we know, the official loin page in Persepctive looks like this:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/3/0314979a8910697a1d71bdadfb6ad19ee793c504.jpeg)  
The problem is that now I wanna make a customized login page with the url of ‘/’, if my home page is ‘/home’, then when I first open the browser and get into ‘/’ page, I don’t need to know the password, instead I can just type in the homepage url ‘/home’ and make the login page useless.  
Could anybody tell me How to deal with this problem?  
Thank you guys so much.

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [May 24, 2021, 7:10am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/2 "2021-05-24T07:10:47Z")

</div>

Hi @Jay_L, just wanted to clarify 🙂 …

Is the issue that you’re able to bypass the authentication stage by using the URL?

If so, have you correctly setup security correctly on your Views and components (see [here](https://docs.inductiveautomation.com/display/DOC81/Security+in+Perspective) for more info)?

---

<div class="post-metadata">

**Author:** ![Jay\_L](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Jay\_L](https://forum.inductiveautomation.com/u/Jay_L)\
**Post date:** [May 24, 2021, 7:52am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/3 "2021-05-24T07:52:46Z")

</div>

Thank you Matthew!!  
However, I don’t know how to acctually set the user to be the one I’ve set to be allowde to access the session in Perspecitve when I click in my own login button, because the function “system.security.switchUser” requires Vision module.  
Looking forward to your help!!!

---

<div class="post-metadata">

**Author:** ![matthew.ayre](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew.ayre/32/19499_2.png) [@matthew.ayre](https://forum.inductiveautomation.com/u/matthew.ayre)\
**Post date:** [May 24, 2021, 7:57am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/4 "2021-05-24T07:57:51Z")

</div>

The correct function for Perspective is [system.perspective.login()](https://docs.inductiveautomation.com/display/DOC81/system.perspective.login) 🙂

This will redirect to the Ignition’s authentication page though, which I am guessing is not what you want. You will likely need to redirect it to your own login page.

---

<div class="post-metadata">

**Author:** ![Jay\_L](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Jay\_L](https://forum.inductiveautomation.com/u/Jay_L)\
**Post date:** [May 24, 2021, 8:02am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/5 "2021-05-24T08:02:34Z")

</div>

Yes the Ignition’s authentication page is not I want, that why this topic exists 😂 😂 😂  
And what do you mean I can edirect it to your own login page, it really confuses me cause without the help of the function, I am still unable to authenticate.

---

<div class="post-metadata">

**Author:** ![roberto.camp](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roberto.camp](https://forum.inductiveautomation.com/u/roberto.camp)\
**Post date:** [May 24, 2021, 8:06am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/6 "2021-05-24T08:06:31Z")

</div>

You’re not the first one to bring this up.

See: [[feature-13896]Customizing Perspective Login Page](http://forum.inductiveautomation.com/t/feature-13896-customizing-perspective-login-page/25006)

As I understand it, this is not something they will develop for easy customization. Using an IDP helps, but even with that setup the auto-logout redirects to that screen. As far as I’m aware, it’s not possible to avoid it completely.

---

<div class="post-metadata">

**Author:** ![Jay\_L](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Jay\_L](https://forum.inductiveautomation.com/u/Jay_L)\
**Post date:** [May 24, 2021, 8:16am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/7 "2021-05-24T08:16:36Z")

</div>

Thank you for your help my friend.  
I wonder how much does the IDP helps? Is it possible to let the user type in the usr and the pwd in the customized login page?  
As far as I understand from your topic and the answer above, it looks unreachable so far?

---

<div class="post-metadata">

**Author:** ![roberto.camp](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roberto.camp](https://forum.inductiveautomation.com/u/roberto.camp)\
**Post date:** [May 24, 2021, 9:06am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/8 "2021-05-24T09:06:41Z")

</div>

I’m no expert, we did this with support from another company more familiar with IDPs, but if you use an IDP you can make your login page look however you want. We’re currently using Google and Microsoft accounts linked to the IDP configured in Ignition, and we use Ignition security levels and rules to admit domains and specific user accounts. So yes, you can have a custom login page in this way.

However, in some cases when the system logs out by itself due to timeout, it redirects to the normal Ignition login page. If you try to login from there it redirects users again to the main IDP login page configured on the perspective project.

In terms of actually “changing” the default Ignition login page with some sort of customization, yes, it is unreachable.

A year or so ago I tried making a perspective project that functioned as a “project gateway” and I made a custom login project. The project was public, so it skipped the login page, but I encountered too many issues that I couldn’t handle via scripting properly. So I gave up on it. There’s been many updates since then, so maybe you could try this. But if you want to avoid the ignition login view completely I’m not sure it’s possible.

---

<div class="post-metadata">

**Author:** ![Jay\_L](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@Jay\_L](https://forum.inductiveautomation.com/u/Jay_L)\
**Post date:** [May 24, 2021, 9:31am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/9 "2021-05-24T09:31:06Z")

</div>

Youy detailed explaining is fascinating my friend and I really benefit from it.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/c/cccec2e75a766181959bb442a0fd55522cd7db50.png)  
Also,Is this the service you mentioned that Google provided to enable us to connect the Identity Provider with the google account then make it possible to login using google account?

---

<div class="post-metadata">

**Author:** ![roberto.camp](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roberto.camp](https://forum.inductiveautomation.com/u/roberto.camp)\
**Post date:** [May 24, 2021, 11:13am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/10 "2021-05-24T11:13:49Z")

</div>

We used the Microsoft Azure IDP, not the google one. We then linked the google one. But in theory yes any IDP that supports OpenID or SAML2.0 should work.

Keep in mind our solution is a bit more complex than a straight IDP, we added some middleware to add some other features.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [May 26, 2021, 1:52pm UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/11 "2021-05-26T13:52:16Z")

</div>

> A year or so ago I tried making a perspective project that functioned as a “project gateway” and I made a custom login project. The project was public, so it skipped the login page, but I encountered too many issues that I couldn’t handle via scripting properly. So I gave up on it. There’s been many updates since then, so maybe you could try this. But if you want to avoid the ignition login view completely I’m not sure it’s possible.

Could you give me some specifics about what you couldn't handle ?  
I'm currently in the process of making one of those project gateway, and I'm curious as to what didn't work for you. Maybe It can help me avoid some headache in the future.

---

<div class="post-metadata">

**Author:** ![roberto.camp](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@roberto.camp](https://forum.inductiveautomation.com/u/roberto.camp)\
**Post date:** [June 7, 2021, 9:51am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/12 "2021-06-07T09:51:38Z")

</div>

As I recall the main issue was the way the login/logout/redirect worked. I think logging in and redirecting was not an issue, but when you logged out the scope of the logout script didn’t allow the code to execute properly. Though I honestly don’t remember and they have added functions since my last attempt, so you might not encounter the issues I had at all.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [June 7, 2021, 9:56am UTC](https://forum.inductiveautomation.com/t/how-to-make-a-customized-login-page-in-perspective/47027/13 "2021-06-07T09:56:48Z")

</div>

I think I see what you mean, I had a similar problem. But I don’t actually want to log the user out, since his login info are the same as the project he’s being redirected too, I just wanted to close the session to avoid having too many perspective session opened at the same time… Which was easy enough:

```python
system.perspective.navigate(url=self.view.params.url)
system.perspective.closeSession(self.session.props.id)

```

Thanks for the answer
