Skip to content

Return Authorization Code -- PATCH FILE #3

@Gerst20051

Description

@Gerst20051

Can you please advise me? @bumpmann @thyb @william26

This Is How You Do It With JavaScript.

OAuth.popup(provider, {
    state: oauthstate
}).done(handleOAuthAuthorization);
function handleOAuthAuthorization(result){
    $.ajax({
        url: 'index.php',
        type: 'POST',
        dataType: 'json',
        data: {
            code: result.code
        }
    }).done(function(r){
        handleOAuthCallback(r);
    });
}

What I'm Trying To Do With Android

OAuth o = new OAuth(this);
o.setOAuthdURL("https://andrew.easypparking.com:6284");
o.initialize("key");
JSONObject opts = new JSONObject();
JSONObject json = null;
try {
    json = getPostJSON("https://andrew.easypparking.com/apps/mobile/oauth/index.php?resource=genstate");
    opts.put("state", json.getString("oauthstate"));
} catch (JSONException e) {
    e.printStackTrace();
}
try {
    opts.put("oauthprovider", provider);
} catch (JSONException e) {
    e.printStackTrace();
}
o.popup(provider, opts, CurrentCallbackActivity.this);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions