From db98db3b22c489d621f5f7439158659e470d50fc Mon Sep 17 00:00:00 2001 From: Joy Wang <108701016+joyqvq@users.noreply.github.com> Date: Tue, 26 Sep 2023 17:48:52 -0400 Subject: [PATCH] chore: add ToString for OIDCProvider --- fastcrypto-zkp/src/bn254/zk_login.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fastcrypto-zkp/src/bn254/zk_login.rs b/fastcrypto-zkp/src/bn254/zk_login.rs index 3580f49bb0..019e74a082 100644 --- a/fastcrypto-zkp/src/bn254/zk_login.rs +++ b/fastcrypto-zkp/src/bn254/zk_login.rs @@ -97,6 +97,16 @@ impl FromStr for OIDCProvider { } } +impl ToString for OIDCProvider { + fn to_string(&self) -> String { + match self { + Self::Google => "Google".to_string(), + Self::Twitch => "Twitch".to_string(), + Self::Facebook => "Facebook".to_string(), + } + } +} + impl OIDCProvider { /// Returns the provider config consisting of iss and jwk endpoint. pub fn get_config(&self) -> ProviderConfig {