###### tags: `api` # 登入系統 ### POST http://localhost:5000/login/ desc: 從第三方拿取使用者資料後,登入app系統的api,若已經是app的使用者,則直接回傳原本的token(沒變),若還不是,則建立一個新的account,並且一樣回傳token。 request data: ``` type - json { "userName": String, "userNickName": String, "userGender": Number, "userEmail": String, (必填) "userAuthId": String, (必填) "userAuthFrom": String (必填) } ``` 註: | 欄位名稱 | 欄位類型 | 備註/說明 | | -------- | -------- | --------| | userAuthId| String | 第三方ID | | userAuthFrom | String | 第三方名稱 | | userGender | Number | 0->女, 1->男 | response: :::success type - json { error: 0000, message: "OK" token: $user.token, (user 的 jwt token) first: true (判斷是否為第一次登入) } :::
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up