HomePhabricator
Diffusion Comm b544d8c66232

[lib] Handle logged in / logged out case in useGetIdentitySearchAuthMessage

Description

[lib] Handle logged in / logged out case in useGetIdentitySearchAuthMessage

Summary:
This replaces the getAuthMetadata conditional (which wasn't necessary) with whether or not we're logged in. If we're not logged in,
we should return early with a null as to avoid checking the contents of the auth metadata

Downstream this will result in the IdentitySearchAuthMessage always being set to null, causing the identity search context to not initialize.
As users are not logged in, there shouldn't be any need to use identity search context anyway.

We also add a console log if the AuthMetadata is incomplete to notify devs as this shouldn't happen if we're logged in

Test Plan: Tested on local. Successfully returned a null IdentitySearchAuthMessage value. When logged out, there is no error message. When logged in, getting incomplete auth metadata console log message

Reviewers: varun

Reviewed By: varun

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11200

Details

Provenance
willAuthored on Feb 29 2024, 9:25 AM
Reviewer
varun
Differential Revision
D11200: [lib] Handle logged in / logged out case in useGetIdentitySearchAuthMessage
Parents
rCOMMcb85c9dca8de: [terraform] ddb table for identity workflows in progress
Branches
Unknown
Tags
Unknown