class ResponseFactory
Methods
Handle an OAuth callback by logging in an existing user or beginning the registration flow for a new one.
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 80
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 99
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.