Returning 401 from Phoenix.Socket.connect/2

Hi all,
I’m using Phoenix.Socket.connect/2 to verify authentication using the params argument, but i would like to return 401 to the client.

I see that 403 is always returned instead (see here). Is there a reason why connect/2 doesn’t allow to return a reason but only :error? Is there any alternative?

Thanks

I created an issue for this: https://github.com/phoenixframework/phoenix/issues/2847

1 Like