0

I'm trying to follow the Bootstrap ServiceStack code from http://bootstrapapi.apphb.com/

I can register a new user, but soon I do everything I want (create a new user on my table that extends the UserAuth table) in the CreateUserAuth() method from my CustomUserAuth it redirects to http://localhost:50447/api/register

I want to go back to the Home Controller...

What is the simple way to accomplish this?

In the docs, under Authentication, this is not very explicit, and I'm using the latest version to date: v4.0.30 and I'm implementing a custom CredentialsAuthProvider.

balexandre
  • 73,608
  • 45
  • 233
  • 342

1 Answers1

1

You can use the ?Continue=/path QueryString parameter to specify where it should redirect to.

If you're using your own custom UserAuth tables (i.e instead of integrating with the existing UserAuth tables) you should subclass OrmLiteAuthRepository<T,T> class including your custom POCO's, e.g see the source for OrmLiteAuthRepository:

public class OrmLiteAuthRepository 
    : OrmLiteAuthRepository<UserAuth, UserAuthDetails>, IUserAuthRepository
{
    public OrmLiteAuthRepository(IDbConnectionFactory dbFactory) 
        : base(dbFactory) { }
}
Community
  • 1
  • 1
mythz
  • 141,670
  • 29
  • 246
  • 390
  • I'm using NHibernate and ended up using the examples you have in the wiki regarding [`CustomUserAuthRepository`](https://github.com/ServiceStack/ServiceStack/blob/master/src/ServiceStack.Authentication.NHibernate/NHibernateUserAuthRepository.cs) and a modified version of the [`CustomUserSession`](https://github.com/ServiceStackApps/SocialBootstrapApi/blob/880d0893d5a99b39867d5961c9e5eb4ffdb5c64c/src/SocialBootstrapApi/Models/CustomUserSession.cs) – balexandre Aug 18 '14 at 16:28