var OAuthErrorType = /* @__PURE__ */ ((OAuthErrorType2) => {
  OAuthErrorType2["INVALID_TOKEN"] = "invalid_token";
  OAuthErrorType2["TOKEN_EXPIRED"] = "token_expired";
  OAuthErrorType2["TOKEN_REVOKED"] = "token_revoked";
  OAuthErrorType2["REFRESH_FAILED"] = "refresh_failed";
  OAuthErrorType2["ENCRYPTION_FAILED"] = "encryption_failed";
  OAuthErrorType2["DECRYPTION_FAILED"] = "decryption_failed";
  OAuthErrorType2["PROVIDER_ERROR"] = "provider_error";
  OAuthErrorType2["NETWORK_ERROR"] = "network_error";
  return OAuthErrorType2;
})(OAuthErrorType || {});
class OAuthError extends Error {
  constructor(type, message, provider, originalError) {
    super(message);
    this.type = type;
    this.provider = provider;
    this.originalError = originalError;
    this.name = "OAuthError";
  }
}
export {
  OAuthError,
  OAuthErrorType
};
