class ResponseFactory
Methods
Handle an OAuth callback by logging in an existing user or beginning the registration flow for a new one.
Find an existing account to link this provider identity to, when it has no link yet. By default that is the account with the email address the provider vouched for ({Registration::provideTrustedEmail()}).
Build a redirect response for a successfully authenticated existing user.
Build a redirect response that triggers the registration modal on the frontend.
Details
at
line 23
__construct( Rememberer $rememberer)
at
line 39
ResponseInterface
make(string $provider, string $identifier, callable $configureRegistration, string $returnTo = '/')
Handle an OAuth callback by logging in an existing user or beginning the registration flow for a new one.
at
line 85
protected User|null
findUserToLink(string $provider, string $identifier, array $provided)
Find an existing account to link this provider identity to, when it has no link yet. By default that is the account with the email address the provider vouched for ({Registration::provideTrustedEmail()}).
Override this to change which account is linked. Returning null sends the user to sign up, where an address already in use is rejected until 3.0 makes email addresses non-unique (flarum/framework#4426).
at
line 100
protected ResponseInterface
makeLoggedInResponse( User $user, string $returnTo)
Build a redirect response for a successfully authenticated existing user.
Sets the remember-me cookie so the session is established on the next request. Override this method to customise the login redirect or cookie behaviour.
at
line 119
protected ResponseInterface
makeRegistrationResponse(string $token, string $returnTo)
Build a redirect response that triggers the registration modal on the frontend.
The `_flarum_auth` query parameter carries the registration token. The frontend detects this parameter on boot, strips it from the URL, and opens the SignUpModal pre-populated with data from the provider. Override this method to customise how the registration handoff is communicated to the frontend.