# Post-login Action Event

**URL:** <https://community.auth0.com/t/post-login-action-event/111822>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [July 21, 2023, 5:16pm UTC](https://community.auth0.com/t/post-login-action-event/111822 "2023-07-21T17:16:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ozurek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ozurek/32/49147_2.png) [@ozurek](https://community.auth0.com/u/ozurek)\
**Post date:** [July 21, 2023, 5:16pm UTC](https://community.auth0.com/t/post-login-action-event/111822/1 "2023-07-21T17:16:40Z")

</div>

Post-login event includes an authentication object which has a methods array. This is mentioned in documentation and also used in Auth0 examples:

> **[Actions Triggers: post-login - Event Object](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/event-object)**
>
> Learn about the post-login Action trigger's event object, which provides contextual information about a single user logging in via Auth0.

> **[Configure WebAuthn with Device Biometrics for Passwordless Authentication](https://auth0.com/docs/authenticate/login/auth0-universal-login/passwordless-login/webauthn-device-biometrics)**
>
> Learn how to configure WebAuthn with device biometrics for passwordless authentication.

Today, all of a sudden our staging and production logins started failing. Upon further inspection, I realized the methods array was no longer part of the object so trying to use it in the action as an array broke event: `event.authentication.methods[0]`. Is this a new change or something that needs fixing?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 21, 2023, 6:03pm UTC](https://community.auth0.com/t/post-login-action-event/111822/3 "2023-07-21T18:03:20Z")

</div>

Hey there @ozurek welcome to the community!

> [@ozurek](#):
>
> Upon further inspection, I realized the methods array was no longer part of the object so trying to use it in the action as an array broke event: `event.authentication.methods[0]`. Is this a new change or something that needs fixing?

It looks like `event.authentication.methods` array is still included in the `event` object - Are logins that are failing related to a Google social connection by chance?

---

<div class="post-metadata">

**Author:** ![ozurek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ozurek/32/49147_2.png) [@ozurek](https://community.auth0.com/u/ozurek)\
**Post date:** [July 21, 2023, 6:30pm UTC](https://community.auth0.com/t/post-login-action-event/111822/4 "2023-07-21T18:30:40Z")

</div>

@ty.frith I unfortunately don’t see methods. I do see riskAssessment though which we are also using. And no, logins are not related to google social connections.

![Screenshot 2023-07-21 at 21.29.05](https://global.discourse-cdn.com/auth0/original/3X/6/c/6c824066c8c75e5b485258ee3ee3d8738f3b3cd1.png)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 21, 2023, 8:56pm UTC](https://community.auth0.com/t/post-login-action-event/111822/5 "2023-07-21T20:56:39Z")

</div>

Thanks for confirming!

I am using the following Action in my environment:

```auto
exports.onExecutePostLogin = async (event, api) => {
     if (event.authentication) {
     console.log(event.authentication.methods)
   }
}

```

Logs using Real-Time Webask Logs Extension:

 ![Screenshot 2023-07-21 at 1.54.18 PM](https://global.discourse-cdn.com/auth0/original/3X/8/1/819ea3fdfb6dc93a1bcdb77e376d0c24f3fb7e96.png)

And in Monitoring → Logs → Successful Login → Action Details

 ![Screenshot 2023-07-21 at 1.55.21 PM](https://global.discourse-cdn.com/auth0/original/3X/6/e/6e99f389b380ea3e69d377c57737a0c4a9f1e6c1.png)

Does running a similar, stripped down action in your environment not yield the same result?

Let us know!

---

<div class="post-metadata">

**Author:** ![josiahkhor](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/josiahkhor/32/39784_2.png) [@josiahkhor](https://community.auth0.com/u/josiahkhor)\
**Post date:** [July 21, 2023, 9:13pm UTC](https://community.auth0.com/t/post-login-action-event/111822/6 "2023-07-21T21:13:46Z")

</div>

Same issue is happening here, I’ve made a simple action that logs the entire `event.authentication` object and it doesn’t have any `methods` array at all.

 ![Screenshot 2023-07-22 at 7.10.15 am](https://global.discourse-cdn.com/auth0/original/3X/4/b/4b4b6d6dfe58f6a70dc1c2ed574aa634a2ea069f.png)

 ![Screenshot 2023-07-22 at 7.12.18 am](https://global.discourse-cdn.com/auth0/original/3X/8/a/8a15b0c0a6e63a7b77ac22729713a94a11e60311.png)

 ![Screenshot 2023-07-22 at 7.13.22 am](https://global.discourse-cdn.com/auth0/original/3X/7/8/784cea411afb4890c756c953be1e90cd17f77670.png)

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [July 21, 2023, 9:27pm UTC](https://community.auth0.com/t/post-login-action-event/111822/7 "2023-07-21T21:27:14Z")

</div>

Hey @josiahkhor !

Do you see the same behavior if you specifically log `event.authentication.methods`?

---

<div class="post-metadata">

**Author:** ![josiahkhor](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/josiahkhor/32/39784_2.png) [@josiahkhor](https://community.auth0.com/u/josiahkhor)\
**Post date:** [July 22, 2023, 8:07pm UTC](https://community.auth0.com/t/post-login-action-event/111822/9 "2023-07-22T20:07:25Z")

</div>

Hi @ty.frith,

Yep, I do. I first noticed the behaviour about 1 hour before my post, and can confirm that the action (organization specific MFA rules) we had that relied on the methods array was working fine 12 hours earlier. AU Region if that helps?

 ![Screenshot 2023-07-23 at 6.06.13 am](https://global.discourse-cdn.com/auth0/original/3X/d/3/d39025b8acd702360d3b7e9e22f9cd316a25ebb4.png)

 ![Screenshot 2023-07-23 at 5.42.44 am](https://global.discourse-cdn.com/auth0/original/3X/d/c/dc4d1029baf6f79b3c94f1e11570249ad0794d0c.png)

---

<div class="post-metadata">

**Author:** ![ozurek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ozurek/32/49147_2.png) [@ozurek](https://community.auth0.com/u/ozurek)\
**Post date:** [July 24, 2023, 10:03am UTC](https://community.auth0.com/t/post-login-action-event/111822/10 "2023-07-24T10:03:06Z")

</div>

Looks like the issue was fixed and I can see the methods array again.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 7, 2023, 10:04am UTC](https://community.auth0.com/t/post-login-action-event/111822/11 "2023-08-07T10:04:01Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
