Hello Smart Monks, Please check below code which is an working code snippet . The issue is there is not state parameter for this module and i am working against OKTA authorization server that is needed state parameter. Can you please help me to contact author or provide me a solution in order to push the "state" parameter in the call? Hope you could help me.

use strict; use warnings; use Plack::Middleware; use Plack::Middleware::OAuth; use Plack::Middleware::OAuth::Dev; builder { enable 'OAuth', on_success => => sub { my ($self,$token) = @_; my $userinfo = Plack::Middleware::OAuth::UserInfo->new( config +=> $self->config , token => $token ); if( $token->is_provider('Dev') ) { my $info = $userinfo->ask( $token->provider ); return $self->to_yaml( $info ); } return $self->render( 'Error' ); }, providers => { 'Dev' => { client_id => 'xxxxxxxxxxxxx +xxxxxxxx', state => '', client_secret => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' }, }; mount '/' => webapp->to_app; };

package Plack::Middleware::OAuth::Dev; use warnings; use strict; sub config { + { version => 2, authorize_url => 'https://dev.oktapreview.com/oauth2/v1/authori +ze', access_token_url => 'https://dev.oktapreview.com/oauth2/v1/token', response_type => 'code', grant_type => 'authorization_code', scope => 'openid', } } 1;

Error code from OKTA

http://testchandan.com:5001/dev/callback?error=invalid_request&error_description=The+authentication+request+has+an+invalid+%27state%27+parameter.


In reply to Re^5: Need to resolve the API call query by chandantul
in thread Need to resolve the API call query by chandantul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.