feat: get origin from client (#679)
This commit is contained in:
parent
d8abea75aa
commit
d0567c0d18
4 changed files with 20 additions and 15 deletions
|
@ -26,7 +26,12 @@ async function oauth() {
|
|||
server = server.split('/')[0]
|
||||
|
||||
try {
|
||||
location.href = await $fetch<string>(`/api/${server || DEFAULT_SERVER}/login`)
|
||||
location.href = await $fetch<string>(`/api/${server || DEFAULT_SERVER}/login`, {
|
||||
method: 'POST',
|
||||
body: {
|
||||
origin: location.origin,
|
||||
},
|
||||
})
|
||||
}
|
||||
catch {
|
||||
displayError = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue