# google-auth(二次身份验证器) **Repository Path**: tony_2020/google-auth ## Basic Information - **Project Name**: google-auth(二次身份验证器) - **Description**: Springboot 整合谷歌身份验证器实现两步认证(内附自己写的APP) - **Primary Language**: Java - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 21 - **Created**: 2022-10-17 - **Last Updated**: 2022-10-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # google-auth #### 介绍 Springboot 整合谷歌身份验证器实现两步认证 #### 使用说明 提供了两种绑定方式: 1. 密钥绑定 ``` http://localhost:8080/google-auth/getSecretKey ``` 获取密钥后,打开谷歌身份验证器输入账户名,密钥完成绑定 2. 扫码绑定 ``` http://localhost:8080/google-auth/getQrcode?name=xxxx ``` 获取二维码后,打开谷歌身份验证器扫描二维码完成绑定 3. 获取验证码 ``` http://localhost:8080/google-auth/getCode?secretKey=xxxxxx ``` 4. 验证 ``` http://localhost:8080/google-auth/checkCode?secretKey=xxxxxx&code=xxxxxx ``` 返回 success 则表示成功,返回 error 则表示失败 #### 谷歌身份验证器APP下载 ``` http://d7.xiaotongqq.com/googe.apk ``` 5. 自己写的APP使用 使用 HBuildeX 导入项目,更改page/index/index.vue 页面中的 baseUrl ``` // 请求地址 baseUrl: 'http://ip:port/google-auth/', ``` 选择运行到浏览器,或者运行到手机或模拟器(手机需要用数据线连接电脑),或者云打包成apk安装到手机 - 效果预览