burenin-a commented on code in PR #38469:
URL: https://github.com/apache/superset/pull/38469#discussion_r3022192663


##########
superset/models/core.py:
##########
@@ -1360,6 +1355,29 @@ class DatabaseUserOAuth2Tokens(Model, 
AuditMixinNullable):
     refresh_token = Column(encrypted_field_factory.create(Text), nullable=True)
 
 
+class UpstreamOAuthToken(Model, AuditMixinNullable):
+    """
+    Store OAuth tokens from the Superset login provider, for forwarding to 
databases.
+    """
+
+    __tablename__ = "upstream_oauth_tokens"
+    __table_args__ = (
+        sqla.Index("idx_upstream_oauth_tokens_user_provider", "user_id", 
"provider"),

Review Comment:
   That's an issue. I've added unique constraint.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to