@scayle/storefront-nuxt
Version:
Nuxt integration for the SCAYLE Commerce Engine and Storefront API
14 lines (13 loc) • 494 B
JavaScript
import { useRpcCall } from "./useRpcCall.js";
export function useSession() {
return {
login: useRpcCall("oauthLogin"),
register: useRpcCall("oauthRegister"),
guestLogin: useRpcCall("oauthGuestLogin"),
refreshToken: useRpcCall("refreshAccessToken"),
revokeToken: useRpcCall("oauthRevokeToken"),
forgetPassword: useRpcCall("oauthForgetPassword"),
resetPasswordByHash: useRpcCall("updatePasswordByHash"),
loginWithIDP: useRpcCall("handleIDPLoginCallback")
};
}