Forum Discussion

ochaoui's avatar
ochaoui
Frequent Visitor
4 years ago
Solved

Custom connector : pass UI values to StartLogin function

Hi Folks,   I am developing a custom connector where the user write down on the UI : - the API URL - the client_id -the client_secret   I would like to know how to pass the client_id and...
  • ochaoui's avatar
    ochaoui
    4 years ago

    Hi Anonymous ,

     

    Thanks for your reply but it does not reply to my problem.

     

    I found the solution to get those values :

    StartLogin = (clientApplication, dataSourcePath, state, display) =>
        let
          authorizeUrl = AUTHORIZE_URI & "?" & Uri.BuildQueryString([
            response_type = "code",
            client_id = Json.Document(dataSourcePath)[client_id],  
            redirect_uri = REDIRECT_URI,
            state1 = state,
            scope = GetScopeString(SCOPES, SCOPE_PREFIX)
          ])
        in
          [
            LoginUri = authorizeUrl,
            CallbackUri = REDIRECT_URI,
            WindowHeight = WINDOW_HEIGHT,
            WindowWidth = WINDOW_WIDTH,
            Context = null
          ];
    

    You need to parse the "dataSourcePath" variable.

     

    Regards,