deauthorize method

  1. @override
Future<DeauthorizeResult> deauthorize(
  1. DeauthorizeParams params
)

Non-privileged method

This method will invalidate the authorization token for use (if it ever was valid). To avoid disclosure, this method will not indicate whether the auth token was previously valid to the caller.

If, during the current session, the specified auth token was returned by the most recent call to authorize or reauthorize, the session with be placed into the unauthorized state.

Implementation

@override
Future<DeauthorizeResult> deauthorize(final DeauthorizeParams params) async {
  try {
    await provider.disconnect();
  } finally {
    SolanaWalletAdapterWeb.platform.removeListeners(provider);
  }
  return const DeauthorizeResult();
}