https://linen.dev logo
Google Drive Oauth Flow issue
# 🖥│support-forum
i
We just created project on GCP for google drive and added client id and secret id in custom oauth credentials but it is still showing the composio name in the auth page https://cdn.discordapp.com/attachments/1403013891902017556/1403013892522905721/Screenshot_from_2025-08-04_21-15-43.png?ex=68960202&is=6894b082&hm=700fe7947b8336ff73f54c5b4530c9a65377f893b60e2a0826a9c4596ab83f18&
c
Hi Tauseef, Could you share the screenshot of the Auth Consent screen? Also, make sure to add your redirectUrl.
c
It looks like you've not configured redirectUrl. You can refer this doc to White label your experience:
i
Thanks @udaysidagana
@udaysidagana hey, we were able to show the name so thanks for the help. I have a quick question: When a user go to the auth screen, it shows composio url in the bottom. I have attached the ss for your reference. Is there any way we can hide this or remove this? https://cdn.discordapp.com/attachments/1403013891902017556/1403535015794442353/image.png?ex=6897e758&is=689695d8&hm=37c8ee5a12a5e147b102ab94f20891da73dc72073a54657f2b503090f704ffa2&
i
auth_config = composio.auth_configs.create( toolkit="googledrive", options={ "type": "use_custom_auth", "auth_scheme": "OAUTH2", "name": "google auth config", "callback_url": "https://affint.ai/integration/redirect", "credentials":{ "client_id": client_id, "client_secret": client_secret } }, ) connection_request = composio.connected_accounts.initiate( auth_config_id=auth_config.id, user_id=user_id, callback_url="https://affint.ai/dashboard", # callback_url="http://localhost:3000/dashboard", ) print(f"đź”— Authorization config created: {connection_request.redirect_url}") https://cdn.discordapp.com/attachments/1403013891902017556/1403829646516027573/image.png?ex=6898f9bd&is=6897a83d&hm=07d31555dd445251a4f982df3aeb10238e37ad0c56a8f88ae07b0c02f99d551f&
The above snippet code is for Gooogle Drive and you can clearly see the Composio name in the auth screen. We have used the same for Slack but it worked there and I attached the slack auth screenshot below for your refernece. We are just doing back and forth so if you are available for quick call that would be great. Thanks
c
Hi, I can see you've not configured your redirect_url in your credentials. I've attached an Image for your ref. Once your Auth is configured, you can white label it to get the redirect Url and pass it back to Composio. You can refer to this [Documentation](https://docs.composio.dev/docs/custom-auth-configs#create-a-redirect-logic). FYI: CallbackUrl is Post Auth redirection i.e, this is the url to which you will be redirected to post Auth flow. Also, CallbackUrl is to be configured while initiating a connection rather than Auth Config. Let me know if this solves your queries or if you need more context. https://cdn.discordapp.com/attachments/1403013891902017556/1403993841002090526/Screenshot_2025-08-10_at_12.16.19.png?ex=689992a8&is=68984128&hm=413909e70e7ef7f076645f82586c106690b7f611833f8fd7b1b64b9e135b5649&
i
Hey, I have followed the same steps and it is not working. A quick call would be appreciated. Here is my email: tauseef@slideoo.ai Thanks.
u
a
Hey @imtauseef0639_03672, available for a quick call now?
Also, the client secret is sensitive and I would strongly recommend not sharing it publicly!
i
yes
a
i
@app.get("/integration/redirect") async def handle_slack_redirect(request: Request): try: # Extract query parameters code = request.query_params.get("code") state = request.query_params.get("state") if not code or not state: return HTMLResponse(content="Missing code or state", status_code=400) # Exchange code for token via Composio async with httpx.AsyncClient() as client: response = await client.post("https://backend.composio.dev/api/v1/auth-apps/add", json={ "code": code, "state": state, "redirect_uri": "https://app.affint.ai/integration/redirect" }) if response.status_code == 200: # Token exchanged successfully return HTMLResponse(content="Integration successful!You may now close this tab.") else: return HTMLResponse( content=f"ErrorFailed to exchange code. Status: {response.status_code}{response.text}", status_code=response.status_code ) except Exception as e: return HTMLResponse(content=f"Server Error{str(e)}", status_code=500)
a
Copy code
from fastapi import Request
from fastapi.responses import RedirectResponse

@app.get("/integration/redirect")
async def handle_slack_redirect(request: Request):
    try:
        code = request.query_params.get("code")
        state = request.query_params.get("state")
        
        if not code or not state:
            return HTMLResponse(content="<h1>Missing code or state</h1>", status_code=400)
        
        composio_endpoint = "https://backend.composio.dev/api/v1/auth-apps/add"
        
        query_params = []
        for key, value in request.query_params.items():
            query_params.append(f"{key}={value}")
        
        redirect_url = f"{composio_endpoint}?{'&'.join(query_params)}"
        
        return RedirectResponse(url=redirect_url, status_code=302)
        
    except Exception as e:
        return HTMLResponse(content=f"<h1>Server Error</h1><p>{str(e)}</p>", status_code=500)
i
Hi team - related to thus github app thing - can we force the user to "install" the app, instead of just simple oauth?
a
What do you mean by install?
i
There’s the concept of adding an app, but there’s also installing an app
Adding = authorizing*
c
no thats not possible