diff --git a/lib/auth.js b/lib/auth.js index c1faf89..493c26e 100755 --- a/lib/auth.js +++ b/lib/auth.js @@ -36,11 +36,12 @@ res = null; } - state = encodeURIComponent(state || newState()); + state = state || newState(); redirectURI = redirectURI || args.callback; states[state] = { redirectURI: redirectURI, }; + state = encodeURIComponent(state); var url = util.format("https://www.linkedin.com/uas/oauth2/authorization?response_type=code" + "&client_id=%s" +