Skip to content

Commit

Permalink
Fixed connect example in auth docs.
Browse files Browse the repository at this point in the history
Closes #2116
  • Loading branch information
carltongibson committed Sep 11, 2024
1 parent 643d083 commit 52b4470
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/topics/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ To access the user, just use ``self.scope["user"]`` in your consumer code:
class ChatConsumer(WebsocketConsumer):
def connect(self, event):
def connect(self):
self.user = self.scope["user"]
self.accept()
Custom Authentication
Expand Down

0 comments on commit 52b4470

Please sign in to comment.