You've already forked AstralRinth
forked from didirus/AstralRinth
Monorepo missing features (#1273)
* fix tauri config * fix package patch * regen pnpm lock * use new workflow * New GH actions * Update lockfile * update scripts * Fix build script * Fix missing deps * Fix assets eslint * Update libraries lint * Fix all lint configs * update lockfile * add fmt + clippy fails * Separate App Tauri portion * fix app features * Fix lints * install tauri cli * update lockfile * corepack, fix lints * add store path * fix unused import * Fix tests * Issue templates + port over tauri release * fix actions * fix before build command * Add X86 target * Update build matrix * finalize actions * make debug build smaller * Use debug build to make cache smaller * dummy commit * change proj name * update file name * Use release builds for less space use * Remove rust cache * Readd for app build * add merge queue trigger
This commit is contained in:
47
apps/app-frontend/src/helpers/mr_auth.js
Normal file
47
apps/app-frontend/src/helpers/mr_auth.js
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* All theseus API calls return serialized values (both return values and errors);
|
||||
* So, for example, addDefaultInstance creates a blank Profile object, where the Rust struct is serialized,
|
||||
* and deserialized into a usable JS object.
|
||||
*/
|
||||
import { invoke } from '@tauri-apps/api/tauri'
|
||||
|
||||
export async function authenticate_begin_flow(provider) {
|
||||
return await invoke('plugin:mr_auth|authenticate_begin_flow', { provider })
|
||||
}
|
||||
|
||||
export async function authenticate_await_completion() {
|
||||
return await invoke('plugin:mr_auth|authenticate_await_completion')
|
||||
}
|
||||
|
||||
export async function cancel_flow() {
|
||||
return await invoke('plugin:mr_auth|cancel_flow')
|
||||
}
|
||||
export async function login_pass(username, password, challenge) {
|
||||
return await invoke('plugin:mr_auth|login_pass', { username, password, challenge })
|
||||
}
|
||||
|
||||
export async function login_2fa(code, flow) {
|
||||
return await invoke('plugin:mr_auth|login_2fa', { code, flow })
|
||||
}
|
||||
|
||||
export async function create_account(username, email, password, challenge, signUpNewsletter) {
|
||||
return await invoke('plugin:mr_auth|create_account', {
|
||||
username,
|
||||
email,
|
||||
password,
|
||||
challenge,
|
||||
signUpNewsletter,
|
||||
})
|
||||
}
|
||||
|
||||
export async function refresh() {
|
||||
return await invoke('plugin:mr_auth|refresh')
|
||||
}
|
||||
|
||||
export async function logout() {
|
||||
return await invoke('plugin:mr_auth|logout')
|
||||
}
|
||||
|
||||
export async function get() {
|
||||
return await invoke('plugin:mr_auth|get')
|
||||
}
|
||||
Reference in New Issue
Block a user