mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-17 14:29:46 +02:00
Better data key for window
This commit is contained in:
@@ -9,7 +9,7 @@ import { DEFAULT_PKCE_METHOD, getAuthorizationCode, PKCE_PLAIN, PKCE_SHA256 } fr
|
||||
import { getClientCredentials } from './grants/clientCredentials';
|
||||
import { getImplicit } from './grants/implicit';
|
||||
import { getPassword } from './grants/password';
|
||||
import { AccessToken, deleteToken, getToken } from './store';
|
||||
import { AccessToken, deleteToken, getToken, resetDataDirKey } from './store';
|
||||
|
||||
type GrantType = 'authorization_code' | 'implicit' | 'password' | 'client_credentials';
|
||||
|
||||
@@ -71,7 +71,6 @@ export const plugin: PluginDefinition = {
|
||||
actions: [
|
||||
{
|
||||
label: 'Copy Current Token',
|
||||
icon: 'copy',
|
||||
async onSelect(ctx, { contextId }) {
|
||||
const token = await getToken(ctx, contextId);
|
||||
if (token == null) {
|
||||
@@ -84,7 +83,6 @@ export const plugin: PluginDefinition = {
|
||||
},
|
||||
{
|
||||
label: 'Delete Token',
|
||||
icon: 'trash',
|
||||
async onSelect(ctx, { contextId }) {
|
||||
if (await deleteToken(ctx, contextId)) {
|
||||
await ctx.toast.show({ message: 'Token deleted', color: 'success' });
|
||||
@@ -93,6 +91,12 @@ export const plugin: PluginDefinition = {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Clear Window Session',
|
||||
async onSelect(ctx, { contextId }) {
|
||||
await resetDataDirKey(ctx, contextId);
|
||||
},
|
||||
},
|
||||
],
|
||||
args: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user