diff --git a/alby/alby_oauth_service.go b/alby/alby_oauth_service.go
index 9b58c8eb..4e7e7887 100644
--- a/alby/alby_oauth_service.go
+++ b/alby/alby_oauth_service.go
@@ -395,6 +395,15 @@ func (svc *albyOAuthService) GetAuthUrl() string {
return svc.oauthConf.AuthCodeURL("unused")
}
+func (svc *albyOAuthService) UnlinkAccount(ctx context.Context) error {
+ svc.cfg.SetUpdate(userIdentifierKey, "", "")
+ svc.cfg.SetUpdate(accessTokenKey, "", "")
+ svc.cfg.SetUpdate(accessTokenExpiryKey, "", "")
+ svc.cfg.SetUpdate(refreshTokenKey, "", "")
+
+ return nil
+}
+
func (svc *albyOAuthService) LinkAccount(ctx context.Context, lnClient lnclient.LNClient, budget uint64, renewal string) error {
connectionPubkey, err := svc.createAlbyAccountNWCNode(ctx)
if err != nil {
diff --git a/alby/models.go b/alby/models.go
index a1a1949e..2edf00cd 100644
--- a/alby/models.go
+++ b/alby/models.go
@@ -19,6 +19,7 @@ type AlbyOAuthService interface {
GetMe(ctx context.Context) (*AlbyMe, error)
SendPayment(ctx context.Context, invoice string) error
DrainSharedWallet(ctx context.Context, lnClient lnclient.LNClient) error
+ UnlinkAccount(ctx context.Context) error
RequestAutoChannel(ctx context.Context, lnClient lnclient.LNClient, isPublic bool) (*AutoChannelResponse, error)
}
diff --git a/frontend/src/components/layouts/SettingsLayout.tsx b/frontend/src/components/layouts/SettingsLayout.tsx
index 64cb2daf..d5cf2dfe 100644
--- a/frontend/src/components/layouts/SettingsLayout.tsx
+++ b/frontend/src/components/layouts/SettingsLayout.tsx
@@ -108,6 +108,7 @@ export default function SettingsLayout() {
{hasNodeBackup && (
)}
+