1

I see that servicestack supports passing an int? RefId and string RefString in both the Userauth table and the UserAuthDetail table. I have hooked up my sign-up/sign-in process to facebook, but when it tries to add the user I get an error telling me that RefID can't be null? The UserAuthDetail table was created with "Allow Nulls" set to false on that column and no default value supplied. The UserAuth table is set to "allows null" on that column.

How do I pass a refid to the signup process? I know that there is some way to pass it on the querystring but I don't now how to get in the middle of the OAuth transaction. Is there some method I can override?

Should I just change the table?

user2033791
  • 810
  • 12
  • 23

1 Answers1

0

The RefId is a int? column which OrmLite creates allowing null as expected. I'd leave the properties on any POCO's you don't control to reflect the underlying RDBMS schema otherwise you'll run into runtime issues like this.

You can use the OnAuthenticated()/OnRegistered() Session or Auth Events to customize what data is stored in the underlying UserAuth table using a Custom UserSession OnAuthenticated event.

Community
  • 1
  • 1
mythz
  • 141,670
  • 29
  • 246
  • 390
  • Sorry - as usual I got tied up with other emergencies. Sounds like OnRegistered is what I need. Thanks for the info. – user2033791 Jul 20 '16 at 12:39