# New "Authentication Challenge" Feature in Perspective

**URL:** <https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182>\
**Category:** Ignition Early Access\
**Created:** [March 15, 2022, 12:19am UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182 "2022-03-15T00:19:02Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![wiquin](https://avatars.discourse-cdn.com/v4/letter/w/bc8723/32.png) [@wiquin](https://forum.inductiveautomation.com/u/wiquin)\
**Post date:** [January 20, 2023, 8:25pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/21 "2023-01-20T20:25:14Z")

</div>

what about if I am using a perspective workstation in a 800x600 touch screen?. i wont be able to resize in the runtime

---

<div class="post-metadata">

**Author:** ![jspecht](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jspecht/32/6465_2.png) [@jspecht](https://forum.inductiveautomation.com/u/jspecht)\
**Post date:** [January 20, 2023, 9:31pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/22 "2023-01-20T21:31:58Z")

</div>

Have you tried?

I tested this in Perspective Workstation on my laptop with Workstation window resized to about 800x600, and I was able to move and resize the iframe just fine.

Granted my test was not on a touch screen with native screen size of 800x600.

Edit: I'll go ahead and put in a ticket to see what we can do to improve the experience on smaller screen sizes. We can probably make the frame more reactive to screen size and automatically fit based on the available screen real estate...

---

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [October 23, 2023, 9:56pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/23 "2023-10-23T21:56:31Z")

</div>

Hi. I used above 'authenticationchallenge'for button action. What is the issue? It is not working

```auto
system.perspective.authenticationChallenge(idp = "operator",timeout = 3, payload = {"isAction":"true"}, framing = "new")	
	
	if result.isSuccess():	
		self.getSibling("Label").props.text= "TTT"
	else:
		self.getSibling("Label").props.text= "FFF"

```

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [October 23, 2023, 10:05pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/24 "2023-10-23T22:05:32Z")

</div>

The result of the authentication challenge is being sent to a top level perspective event handler. You need to configure/script what the session should do there, instead of in the script where you are calling the auth challenge.

[Documentation](https://docs.inductiveautomation.com/display/DOC81/Component+Events+and+Actions#ComponentEventsandActions-AuthenticationChallengeAction)

> **Authentication Challenge Event Handler**
>
> ![asda515](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/fa877c0fa3abb350c7a634a18ca3decc364372ef.png)

In your case its either set a session custom property to a value or send a perspective message to a specific view/ component to set a value.

---

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [October 23, 2023, 10:15pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/25 "2023-10-23T22:15:52Z")

</div>

My requirement is to request authentication for a button action like requesting a password before the clear set of Alarms. Am I able to do it with this?

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [October 23, 2023, 10:22pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/26 "2023-10-23T22:22:26Z")

</div>

Yes, you should be able to. There would be 2 approaches to your case.

The first approach would be to pass whatever identifying data you need to be able to clear the alarms as part of the payload you pass to the auth challenge. Then, in the `onAuthChallengeCompleted` handler, you would use that data from the payload to clear the associated alarms. (after confirming that the user is allowed to clear the alarms of course)

The other method would be to place the identifying data for the alarms into either a session custom property and fetch it from the `onAuthChallengeCompleted` handler, or place the data into a page custom property and then create a message handler on that page that is called from the `onAuthChallengeCompleted` handler, which grabs the data from the custom property and then clear the alarms using that data.

---

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [October 25, 2023, 3:55am UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/27 "2023-10-25T03:55:47Z")

</div>

> [@ryan.white](#):
>
> send a perspective message to a specific view/ component to set a value.

Are there any better resources available to understand `onAuthChallengeCompleted` handler and 'system.perspective.authenticationChallenge' ?

---

<div class="post-metadata">

**Author:** ![vipo](https://avatars.discourse-cdn.com/v4/letter/v/eada6e/32.png) [@vipo](https://forum.inductiveautomation.com/u/vipo)\
**Post date:** [November 30, 2023, 3:51pm UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/28 "2023-11-30T15:51:16Z")

</div>

Is it possible update the session, with the new user. Instead of using sessionless ?

---

<div class="post-metadata">

**Author:** ![ignitionSL](https://avatars.discourse-cdn.com/v4/letter/i/9e8a1a/32.png) [@ignitionSL](https://forum.inductiveautomation.com/u/ignitionSL)\
**Post date:** [December 1, 2023, 3:56am UTC](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182/29 "2023-12-01T03:56:53Z")

</div>

what do you mean by sessionless?

[Previous page](https://forum.inductiveautomation.com/t/new-authentication-challenge-feature-in-perspective/57182.md?page=1)
