- Reference >
- JavaScript Methods >
- db.logout()
db.logout()¶
-
db.logout()¶ Ends the current authentication session. This function has no effect if the current session is not authenticated.
Note
If you’re not logged in and using authentication,
db.logout()has no effect.db.logout()function provides a wrapper around the database commandlogout.