# Resolving Users

Socialstream resolves users from Socialite using the following logic:

```php
Socialite::driver($provider)->user();
```

However, you may decide you want to customise this functionality. For example, you may decide to use the `stateless` method to [disable state verification](https://laravel.com/docs/9.x/socialite#stateless-authentication). You may do this by updating the `resolve` method in `app/Actions/Socialstream/ResolveSocialiteUser.php`:

```php
/**
 * Resolve the user for a given provider.
 */
public function resolve(string $provider): User
{
    return match ($provider) {
        Providers::google() => Socialite::driver($provider)->stateless()->user(),
        default => Socialite::driver($provider)->user(),
    };
}
```


---

# 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/resolving-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.
