# Authenticating Users

The main benefit of using Socialstream versus writing an OAuth integration for your Laravel application yourself, is that it handles all of the authentication logic for you. If you wish, you may override this logic, by registering your own "authenticator" with Socialstream. To do so, simply create a class that implements Socialstream's `AuthenticatesOauthCallback` contract, and register it with Socialstream via the `boot` method of a service provider:

```php
public function boot(): void
{
    Socialstream::authenticatesOauthCallbackUsing(CustomAuthenticateOauthCallback::class);
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.socialstream.dev/getting-started/customization/authenticating-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
