Reputation: 103
I am using the Azure SignalR service. I've set up multiple azure function apps (Node.js) with various end points for users to join specific groups and to broadcast to those users etc.
I couldn't find detailed documentation on how to determine if a user has logged in before establishing a connection to them. On the negotiate endpoint I pass in a userID but this is just a dummy string I've made up for now. I'm trying to find a way to authorize users via a standard cookie login system.
The flow would be - User is authorized and a cookie is created for a standard session - Somehow pass this cookie to the SignalR negotiate method to check if user is authorized
Any ideas?
Thank you.
Upvotes: 0
Views: 99
Reputation: 6647
The simplest approach would be to setup authentication/authorization on your function app. The same is covered in the SignalR Reference doc as well.
If you are using something like Azure API Management in front of your function app(s), then you would want to enable authentication there.
Upvotes: 1