Skip to content

Commit

Permalink
k
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongsun96 committed Dec 31, 2024
1 parent accd743 commit e6195f0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions backend/onyx/connectors/linear/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def oauth_authorization_url(cls, base_domain: str, state: str) -> str:
if not LINEAR_CLIENT_ID:
raise ValueError("LINEAR_CLIENT_ID environment variable must be set")

callback_uri = get_oauth_callback_uri(base_domain, "linear")
callback_uri = get_oauth_callback_uri(base_domain, DocumentSource.LINEAR.value)
return (
f"https://linear.app/oauth/authorize"
f"?client_id={LINEAR_CLIENT_ID}"
Expand All @@ -95,7 +95,9 @@ def oauth_authorization_url(cls, base_domain: str, state: str) -> str:
def oauth_code_to_token(cls, base_domain: str, code: str) -> dict[str, Any]:
data = {
"code": code,
"redirect_uri": get_oauth_callback_uri(base_domain, "linear"),
"redirect_uri": get_oauth_callback_uri(
base_domain, DocumentSource.LINEAR.value
),
"client_id": LINEAR_CLIENT_ID,
"client_secret": LINEAR_CLIENT_SECRET,
"grant_type": "authorization_code",
Expand Down

0 comments on commit e6195f0

Please sign in to comment.