davcj / Market

1 stars 0 forks source link

Identity Login #1

Open mcsugaman opened 7 years ago

mcsugaman commented 7 years ago

https://medium.com/@goodealsnow/asp-net-core-identity-3-0-6018fc151b4#.sygarxz7k

Tuki je dobr nakazan, kako spimpamo ns login

mcsugaman commented 7 years ago

http://logcorner.com/customize-aspnet-identity-external-database-storage/

Evo tuki pa kaze kako preneses iz LocalDB-ja na Sql Server 👍

mcsugaman commented 7 years ago

Evo.....ko v appsettings.json vneses nov CONNECTION STRING,

potem v Package Manager Console v Visual Studiu vpises : In Visual Studio, you can use the Package Manager Console to apply pending migrations to the database:

PM> Update-Database Alternatively, you can apply pending migrations from a command prompt at your project directory:

dotnet ef database update

IN TAKO SE SKREIRA BAZA za IDentity na novem serverju...

mcsugaman commented 7 years ago

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/social/

Vse o IDENTITYJU, Facebook in Twitter login, Cookiji, itd., itd.

mcsugaman commented 7 years ago

KADAR DELA SPREMEMBE NA ViewModel-ih (npr. dodajaš nova polja za userja, kot so FirstName, LastName, itd....), potem moraš v NPM-ju v Visual Studiu pognati spodnje komande, da se updejtajo tabele na bazi :

There are pending model changes for ApplicationDbContext In Visual Studio, use the Package Manager Console to scaffold a new migration for these changes and apply them to the database:

PM> Add-Migration [migration name] PM> Update-Database Alternatively, you can scaffold a new migration and apply it from a command prompt at your project directory:

dotnet ef migrations add [migration name] dotnet ef database update

MIGRATION NAME je pa pač string, k si ga sam izmisliš .

Torej, ko spremeniš ViewModele, poženeš v NPM-ju komande :

  1. Add-Migration "Dodani so bili novi atributi"
  2. Updata-Database
mcsugaman commented 7 years ago

http://blog.falafel.com/customize-mvc-5-application-users-using-asp-net-identity-2-0/

DODAJANJE NOVIH ATRIBUTOV v BAZO in ViewModel-e

mcsugaman commented 7 years ago

http://johnatten.com/2014/04/20/asp-net-identity-2-0-setting-up-account-validation-and-two-factor-authorization/

IMPLEMENTACIJA dvojne avtentikacije (Email in SMS potrditev racuna)