All Projects → HazySoda → vue-koa2-login

HazySoda / vue-koa2-login

Licence: MIT license
🍥 Vue + Koa2 实现前后端注册登录流程

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to vue-koa2-login

RN-login-register-screen
Usage of login / sign-in screen with register / sign-up and forget password screen for authentication in react-native with navigation and Async local storage of input values
Stars: ✭ 32 (+39.13%)
Mutual labels:  login, register
UserCenter
Personal open source user center
Stars: ✭ 28 (+21.74%)
Mutual labels:  login, register
Apriliya-Api
Simple Web API with user authentication
Stars: ✭ 19 (-17.39%)
Mutual labels:  login, register
logSys
PHP Secure, Advanced Login System
Stars: ✭ 80 (+247.83%)
Mutual labels:  login, register
auth-flow-react-apollo-saga
Full stack login/register flow with React, Apollo, Redux, Redux-saga and MongoDB.
Stars: ✭ 22 (-4.35%)
Mutual labels:  login, register
ionic-login-component
Free sample of Premium Ionic Login Component
Stars: ✭ 17 (-26.09%)
Mutual labels:  login, register
yoti-php-sdk
The PHP SDK for interacting with the Yoti Platform
Stars: ✭ 22 (-4.35%)
Mutual labels:  login, register
JWT-user-auth-API-bolilerplate
Boilerplate for backend API user authentication with JWT
Stars: ✭ 13 (-43.48%)
Mutual labels:  login, jsonwebtoken
spring-boot-mongodb-security-angular8
Spring Boot, Security, MongoDB, Angular 8: Build Authentication
Stars: ✭ 17 (-26.09%)
Mutual labels:  login, register
yoti-java-sdk
The Java SDK for interacting with the Yoti Platform
Stars: ✭ 13 (-43.48%)
Mutual labels:  login, register
blog-backend
前后端分离实践----基于Koa2框架博客后端
Stars: ✭ 54 (+134.78%)
Mutual labels:  koa, jsonwebtoken
user login and register
user login and register system in django
Stars: ✭ 43 (+86.96%)
Mutual labels:  login, register
X Restful Api Generator Koa
一个基于 Koa 的 RESTful API 服务脚手架。 A RESTful API generator for Koa
Stars: ✭ 18 (-21.74%)
Mutual labels:  koa, jsonwebtoken
undertow-pac4j
Security library for Undertow: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 35 (+52.17%)
Mutual labels:  login
koa-mongoDB
😊😊Koa and mongoose build services
Stars: ✭ 24 (+4.35%)
Mutual labels:  koa
MyJWT
A cli for cracking, testing vulnerabilities on Json Web Token(JWT)
Stars: ✭ 92 (+300%)
Mutual labels:  jsonwebtoken
react-linkedin-login-oauth2
Easily get Authorization Code from Linked In to log in without redirecting.
Stars: ✭ 83 (+260.87%)
Mutual labels:  login
verify-apple-id-token
Verify the Apple id token on the server side.
Stars: ✭ 49 (+113.04%)
Mutual labels:  login
koa-ip-filter
koa middleware to filter request IPs or custom ID with glob patterns, array, string, regexp or matcher function. Support custom 403 Forbidden message and custom ID.
Stars: ✭ 23 (+0%)
Mutual labels:  koa
loginguard
Two Step Verification for Joomla!™ – from the developer of Joomla's Two Factor Authentication
Stars: ✭ 21 (-8.7%)
Mutual labels:  login

vue-koa2-login

Vue + Koa2 实现前后端注册登录流程

技术栈

前端:

后端:

环境要求

  1. Node.js:推荐最新LTS版本,至少要在v7.6以上 (7.6默认支持Async/Await)。
  2. MySQL:我使用的是最新版本,5.x应该都可以。
  3. Yarn (可选):我个人强力安利Yarn,下面的例子也会使用,如果您不想使用Yarn,使用NPM即可。

运行项目

上面的环境依赖都装好以后,在运行之前,我们要先对后端项目进行一些配置:

# 先把项目克隆到本地
$ git clone [email protected]:KidneyFlower/vue-koa2-login.git

# 进入后端项目文件夹
$ cd vue-koa2-login/server/

打开src/config/index.js会看到如下代码:

module.exports = {
  db: {
    dialect: 'mysql', // 连接数据库的类型
    host: 'localhost', // MySQL 地址
    port: '3306', // MySQL 端口号
    username: 'root', // MySQL 用户名
    password: 'password', // MySQL 密码
    database: 'test', // 使用的数据库名称
    operatorsAliases: false // Issue #8417
  },
  jwt: {
    secret: 'KidneyFlower', // jsonwebtoken 使用的 secret
    options: {
      expiresIn: '60s' // Token 的过期时间
    }
  }
}

将配置项中的数据修改为你的实际数据,保存后我们继续:

# 安装后端所需依赖
$ yarn install

# 运行后端项目
$ yarn dev

# 如果后端运行正常,打开一个新的终端窗口

# 进入前端项目文件夹
$ cd /your/path/to/vue-koa2-login/

# 安装前端所需依赖
$ yarn install

# 运行前端项目
$ yarn serve

前端项目地址:http://127.0.0.1:8080

后端项目地址:http://127.0.0.1:3000

Issues & Pull Requests

由于本人是Node.js的初学者,写出的代码虽然可以运行,但一定不是最优解,如果您愿意在这方面指导我,欢迎您在Issue中提出宝贵的建议。

如果您觉得项目中哪里写得不好或者有更好、更简洁的写法,也欢迎您提出宝贵的Pull Request

不胜感激!!!

License

MIT

Copyright (c) 2018-present, KidneyFlower

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].