User Login Flow is Broken and Flawed


  • Angel One SmartAPI User Login Flow Issue

    Issue Description:
    When integrating Angel One's SmartAPI user login (https://smartapi.angelone.in/publisher-login), we're encountering issues with the login response handling. The login window remains static after authentication, and we're unable to capture the response or redirect back to our application.

    Current Behavior:

    1. Login window opens successfully
    2. User authenticates
    3. Response is received (visible in Network tab):
    json
    {
    "status": 302,
    "url": "https://steadfastapp.in/angelone/redirect",
    "data": {
    "jwtToken": "...",
    "refreshToken": "...",
    "feedToken": "..."
    }
    }
    
    1. But the window remains open and static

    Attempted Solutions:

    1. Direct response capture using MutationObserver
    2. Response interception using injected scripts
    3. Redirect URL handling

    Request:

    1. Please add support for localhost URLs during development (http://localhost:*)
    2. Consider implementing a proper OAuth2 redirect flow similar to other brokers

    Why localhost support matters:

    • Essential for local development and testing
    • Industry standard practice (used by Zerodha, Flattrade)
    • Speeds up integration and reduces development time
    • Helps in debugging and testing security implementations

    Demo Video:
    Link to screen recording showing the login window staying open after authentication

    Would appreciate guidance on the recommended way to handle the authentication flow during development. Thanks!

    #smartapi #authentication #development


  • We do not provide local host support, also the JS plugin is working properly. There could be an issue with your code.