Skip to content

fix: improve consistency and clarity in Simple Domain Allow List POST_LOGIN template#30

Open
snocchy wants to merge 3 commits into
auth0:mainfrom
snocchy:improve-post-login-action
Open

fix: improve consistency and clarity in Simple Domain Allow List POST_LOGIN template#30
snocchy wants to merge 3 commits into
auth0:mainfrom
snocchy:improve-post-login-action

Conversation

@snocchy

@snocchy snocchy commented Aug 15, 2025

Copy link
Copy Markdown

Changes

This PR improves code consistency and clarity in simple-domain-allowlist-POST_LOGIN template:

  • Remove misleading comments about api.access.deny() taking a second userMessage parameter. This parameter applies to pre-user-registration Actions trigger, not post-login.
  • Add missing early return statement for consistency. If the lack of return was intentional, please let me know.
  • Separate combined return api.access.deny() statements into distinct lines to clarify the intent of each operation. The return value of onExecutePostLogin seems to have no meaning according to the sample codes in the documentation.

References

  • I added at least one link to explain why this change is needed.

We discussed this internally, so I don’t have a public link. I thought it would be faster to just write the code and open a PR rather than start a public discussion.

Testing

Steps to Reproduce

  1. Test login attempts with users having:
    • Valid and verified email address from allowed domain
    • Valid and verified email address from non-allowed domain
    • Valid and unverified email address from allowed domain
    • Invalid email address
    • Missing email address
  2. Confirm that the denial message is displayed and the action execution stops properly for each invalid case

Checklist

@snocchy
snocchy requested a review from a team as a code owner August 15, 2025 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant