Skip to content

Commit

Permalink
fix: incorrect token var
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDwee committed Jan 22, 2025
1 parent 9060a90 commit 116c36b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions static/src/helpers/verify.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {getUser} from "../stores/auth";
const VITE_KB_API_URL = import.meta.env.VITE_KB_API_URL
const user = getUser()

export async function linkEmail(organization, code, overwrite=false) {
export async function linkEmail(organization, token, overwrite=false) {
await axios.post(`${VITE_KB_API_URL}/verify/email/link`, {
'organization': organization,
'token': code,
'token': token,
'overwrite': overwrite
},
{
Expand Down
2 changes: 1 addition & 1 deletion static/src/pages/verify/BaseVerifyCallback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function linkThenRedirect(overwrite){
await props.authFlow.callback()
try {
await linkEmail(props.organization, props.authFlow.token.access_token, overwrite)
await linkEmail(props.organization, props.authFlow.token.accessToken, overwrite)
redirectHome()
} catch (err) {
console.log(err)
Expand Down
2 changes: 1 addition & 1 deletion static/src/pages/verify/VerifyEmailCallback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class EmailCustomFlow extends OauthFlow {
constructor(token) {
super()
this.token = new OauthToken()
this.token.access_token = token
this.token.accessToken = token
}
async callback() {
Expand Down

0 comments on commit 116c36b

Please sign in to comment.