https://linen.dev logo
redirect urI is not working
# 🖥│support-forum
a
I am able to generate redirect url, but it says access blocked, i have following all the steps. mentioning in the following documentation https://docs.composio.dev/docs/custom-auth-configs#how-does-this-work following are the params options = { "type": "use_custom_auth", # <- UnionMember1 "auth_scheme": "OAUTH2", # one of the allowed literals "name": "temp-Integration", # optional display name "credentials": { "client_id": os.getenv("GOOGLE_CLIENT_ID"), "client_secret": os.getenv("GOOGLE_CLIENT_SECRET"), "redirect_uri": "https://app.dynaris.ai/redirect", } } please tell me how to make this work https://cdn.discordapp.com/attachments/1407351592478445658/1407351592734294086/image.png?ex=68a5c9cf&is=68a4784f&hm=e173021b957c0d45d296c464f96663a48a79fda81304cb2fdc351a6649e81781& https://cdn.discordapp.com/attachments/1407351592478445658/1407351593417838602/image.png?ex=68a5c9cf&is=68a4784f&hm=1e28a536e67989b639d682b7532ac08c1fee762c534d3347ba7516418f4c7791&
c
Hi Aarish, looks like you've not configured
redirect_uri
. You need to pass it as
oauth_redirect_uri
. Let me know if it works for you!
a
thanks it's working now
can you provide example for fast api connection for white labeling?
documentation example is not complete
u
This an an example snippet which you can refer:
Copy code
python
from fastapi import FastAPI, Request
from fastapi.responses import RedirectResponse
from composio import Composio

# Create a FastAPI app
app = FastAPI()

# Create a Composio client
composio = Composio(api_key="api-key")


@app.get("/")
async def authorize_app(request: Request):
    composio_endpoint = "https://backend.composio.dev/api/v3/toolkits/auth/callback"
    query_params = request.query_params
    redirect_url = f"{composio_endpoint}?{query_params}"
    return RedirectResponse(url=redirect_url, status_code=302)


if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=)