Git Product home page Git Product logo

mmacneil / angularaspnetcoreauthentication Goto Github PK

View Code? Open in Web Editor NEW
85.0 85.0 61.0 2.22 MB

Complete user authentication example with Angular 4 and ASP.NET Core 1.0. There is a new version of this repo based on ASP.NET Core 2.0. Please see https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login for more information.

Home Page: https://fullstackmark.com/post/10/user-authentication-with-angular-and-asp-net-core

C# 1.25% TypeScript 0.93% JavaScript 97.57% HTML 0.21% CSS 0.04%
angular4 asp-net-core

angularaspnetcoreauthentication's People

Contributors

abargstaedt avatar maxisam avatar mmacneil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angularaspnetcoreauthentication's Issues

it does not work

C:\AngularASPNETCoreAuthentication>ng b
Your global Angular CLI version (1.3.0) is greater than your local
version (1.0.0). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
Hash: 8fd7b01ada7c4122305d
Time: 12345ms
chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 183 kB {5} [initial] [rendered]
chunk {1} main.bundle.js, main.bundle.js.map (main) 54.1 kB {4} [initial] [rendered]
chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 191 kB {5} [initial] [rendered]
chunk {3} scripts.bundle.js, scripts.bundle.js.map (scripts) 116 kB {5} [initial] [rendered]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.01 MB [initial] [rendered]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

ERROR in multi script-loader!.//jquery/dist/jquery.js script-loader!.//tether/dist/js/tether.js script-loader!.//bootstrap/dist/js/bootstrap.js
Module not found: Error: Can't resolve 'C:\tw\payment-web-app\TW.PaymentPortal.Web.UI\AngularASPNETCoreAuthentication\node_modules\jquery\dist\jquery.js' in 'C:\tw\payment-web-app\TW.PaymentPortal.Web.UI\AngularASPNETCoreAuthentication'
@ multi script-loader!./
/jquery/dist/jquery.js script-loader!.//tether/dist/js/tether.js script-loader!.//bootstrap/dist/js/bootstrap.js

ERROR in multi script-loader!.//jquery/dist/jquery.js script-loader!.//tether/dist/js/tether.js script-loader!.//bootstrap/dist/js/bootstrap.js
Module not found: Error: Can't resolve 'C:\tw\payment-web-app\TW.PaymentPortal.Web.UI\AngularASPNETCoreAuthentication\node_modules\tether\dist\js\tether.js' in 'C:\tw\payment-web-app\TW.PaymentPortal.Web.UI\AngularASPNETCoreAuthentication'
@ multi script-loader!./
/jquery/dist/jquery.js script-loader!.//tether/dist/js/tether.js script-loader!.//bootstrap/dist/js/bootstrap.js

for upgrade to dot net core 2

in ConfigureServices

    services.AddAuthentication(jwt =>
        {
          jwt.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
          jwt.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
        })
        .AddJwtBearer(jwt =>
        {
          jwt.TokenValidationParameters = new TokenValidationParameters
          {
            ValidateIssuer = true,
            ValidIssuer = jwtAppSettingOptions[nameof(JwtIssuerOptions.Issuer)],

            ValidateAudience = true,
            ValidAudience = jwtAppSettingOptions[nameof(JwtIssuerOptions.Audience)],

            ValidateIssuerSigningKey = true,
            IssuerSigningKey = _signingKey,

            RequireExpirationTime = false,
            ValidateLifetime = false,
            ClockSkew = TimeSpan.Zero
          };
        });

and in Configure

app.UseAuthentication();

Can not Run

After clonning I can not run.
I followed following sequence after clone

  1. npm install
  2. dotnet restore
  3. dotnet build
    it fails when it build angular part of the project
    if i run this command
    npm run build
    it shows the same set of errors
    Versions
    node: 7.7.2
    npm: 3.10..8
    ng: 1,2,6
    dotnet: 1.0.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.