Git Product home page Git Product logo

mmacneil / vueaspnetcore2webapiauth Goto Github PK

View Code? Open in Web Editor NEW
112.0 112.0 43.0 198 KB

Sample project demonstrating jwt-based authentication with an Vue.js (v2.5.13) frontend and ASP.NET Core 2 WebApi. Includes both local user registration with .NET Core Identity membership and facebook login scenarios.

Home Page: https://fullstackmark.com/post/16/user-authentication-with-vuejs-aspnet-core-2-and-facebook-login

License: MIT License

HTML 1.73% Vue 19.55% CSS 0.33% TypeScript 13.86% C# 64.02% JavaScript 0.52%
aspnet-core-2 facebook-login oauth2 vuejs2 vuex webapi

vueaspnetcore2webapiauth's People

Contributors

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  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  avatar  avatar  avatar

vueaspnetcore2webapiauth's Issues

refresh dashboard page

when you refreshing page which require authorization - returned 401 (unauthorized)...

i mean:
register user
go to the dashboard/home
all is ok
press refresh (F5)
crash boom bang

I think, that problem here because interceptor not "intercepts" when page refreshed:

axios.interceptors.request.use((config) => {
    const authToken = store.getters['auth/authToken'];
    if (authToken) {
        config.headers.Authorization = `Bearer ${authToken}`;
    }
    return config;
}, (err) => {
    return Promise.reject(err);
});

20180425125529cf1ij

You may need an appropriate loader to handle this file type - getters

Hi Guys,

I am getting this error when compiling:

ERROR in ./Store/modules/auth.ts Module parse failed: Store\modules\auth.ts Unexpected token (8:31) You may need an appropriate loader to handle this file type. | | const getters = { | isAuthenticated: (authState: any) => !!authState.token, | authStatus: (authState: any) => authState.status, | authToken: (authState: any) => authState.token, @ ./Store/store.ts 3:0-34 @ ./ClientApp/boot.ts @ multi event-source-polyfill webpack-hot-middleware/client?path=__webpack_hmr&dynamicPublicPath=true ./ClientApp/boot.ts

Does anyone know how I can fix this?

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.