Stormpath not automatically redirecting to specified route after registration

72 views Asked by At

Per the documentation, when I enable AutoLogin and specify a NextUri, I should be automatically logged in and redirected to the NextUri after I register. However, neither happen and instead I am directed to the login page. To test that it was nothing permissions related, I made the NextUri an unauthenticated route that only returns a HTTP status of OK.

Here's the code snippet for my configuration:

Configuration = new StormpathConfiguration
        {
            Web = new WebConfiguration
            {
                Register = new WebRegisterRouteConfiguration
                {
                    Enabled = true,
                    AutoLogin = true,
                    NextUri = "/dummy"
                }
            }
        }

And the dummy route for the NextUri:

[Route("dummy")]
[HttpGet]
public HttpResponseMessage DummyRoute()
{
    return new HttpResponseMessage(HttpStatusCode.OK);
}

What am I missing?

1

There are 1 answers

0
Nate Barbettini On

This was a bug, which is fixed in version 0.9.0.

If you set both AutoLogin = true and NextUri = "/dummy" users will be redirected to /dummy after registering. This overrides the NextUri setting for the Login route, and is intended to let you redirect to a "thanks for registering" page, or something like that.