An optional object that can be used to configure the behavior of the getAuth() function. It accepts the following properties:
secretKey?: A string that represents the secret key used to sign the session token. If not provided, the secret key is retrieved from the environment variable CLERK_SECRET_KEY.
The following example demonstrates how to use getAuth() to protect a profile page route and load user data.
If the user is authenticated, their userId is passed to the Backend SDK's getUser() method to retrieve the user's information.
Unlike the previous example that loads data when the page loads, the following example uses getAuth() to only fetch user data after submitting the form. The helper runs on form submission, authenticates the user, and processes the form data.