Is there a way to get the user id without using hooks?

I’m working on a next js application and it would be useful if there was a way to get the userId without using any hooks. Is that possible?

I’d need to use the userId in a function that is not a hook and I’d rather not have to pass it in as an argument each time I want to use this function.

Hey there!

Can you share a link to the doc / quickstart / SDK you are using in your implementation?