You've already forked AstralRinth
forked from xxxOFFxxx/AstralRinth
* fix(app-frontend): do not emit exceptions when no loaders are available * refactor(app): simplify Microsoft login code without functional changes * feat(app): external browser auth flow for Modrinth account login * chore: address Clippy lint * chore(app/oauth_utils): simplify `handle_reply` error handling according to review * chore(app-lib): simplify `Url` usage out of MC auth module
23 lines
644 B
JavaScript
23 lines
644 B
JavaScript
/**
|
|
* 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/core'
|
|
|
|
export async function login() {
|
|
return await invoke('plugin:mr-auth|modrinth_login')
|
|
}
|
|
|
|
export async function logout() {
|
|
return await invoke('plugin:mr-auth|logout')
|
|
}
|
|
|
|
export async function get() {
|
|
return await invoke('plugin:mr-auth|get')
|
|
}
|
|
|
|
export async function cancelLogin() {
|
|
return await invoke('plugin:mr-auth|cancel_modrinth_login')
|
|
}
|