[#979] added Kakao OAuth2 provider

This commit is contained in:
Gani Georgiev
2022-11-13 13:05:06 +02:00
parent 521df149a2
commit 50fce1f3cf
7 changed files with 118 additions and 5 deletions
+18
View File
@@ -55,6 +55,15 @@ func TestNewProviderByName(t *testing.T) {
t.Error("Expected to be instance of *auth.Gitlab")
}
// twitter
p, err = auth.NewProviderByName(auth.NameTwitter)
if err != nil {
t.Errorf("Expected nil, got error %v", err)
}
if _, ok := p.(*auth.Twitter); !ok {
t.Error("Expected to be instance of *auth.Twitter")
}
// discord
p, err = auth.NewProviderByName(auth.NameDiscord)
if err != nil {
@@ -81,4 +90,13 @@ func TestNewProviderByName(t *testing.T) {
if _, ok := p.(*auth.Spotify); !ok {
t.Error("Expected to be instance of *auth.Spotify")
}
// kakao
p, err = auth.NewProviderByName(auth.NameKakao)
if err != nil {
t.Errorf("Expected nil, got error %v", err)
}
if _, ok := p.(*auth.Kakao); !ok {
t.Error("Expected to be instance of *auth.Kakao")
}
}