grandchamp / Identity.Dapper

Identity package that uses Dapper instead EntityFramework for use with .NET Core
MIT License
268 stars 62 forks source link

Table not found in Mysql #53

Closed biju-ps closed 6 years ago

biju-ps commented 6 years ago

I am getting a "Table Identity.IdentityUser does not exist" error when using mysql . My Database Name is DapperIdentityTest .

grandchamp commented 6 years ago

Well... you have to change the default schema, right?

biju-ps commented 6 years ago

There is no schema in Mysql right ?

grandchamp commented 6 years ago

My default scripts are pointing to identity.tablename. If you changed to DapperIdentityTest you'll have to update the SchemaName property of the MySqlConfiguration to DapperIdentityTest.

biju-ps commented 6 years ago

I created a new configuration as MyIdentityConfiguration : SqlConfiguration and removed the %SCHEMA%. Now the error is gone !!.

I just following your sample application. I registered a user and able to login. Then,I put a [Authorize] attribute to the HomeController. Now I am redirecting to the login page again after the login. I put a break point on the Index method , and checked the value of User.Identity.IsAuthenticated . It return false . What I am missing ?

grandchamp commented 6 years ago

Did you put app.UseAuthentication(); on Configure at Startup.cs?

If yes, post your Startup.cs here.

biju-ps commented 6 years ago

Sorry I missed that .. :( Worked as expected .. Thank you !!