<div dir="ltr">I would really really appreciate some help on this tiny problem I'm having.<div><br></div><div>I'm porting my Github Authentication plugin into Dancer2, but for the life of my I can't get it to work and I've been stuck for days now on this.</div>
<div><br></div><div><b>Everything works</b>, but it's just the the session value that is set from within the plugin is undef inside the application.</div><div><br></div><div>Here is the code narrowed down, the Plugin:</div>
<div><a href="https://gist.github.com/gideondsouza/6718246#file-dancer2_plugin_gh_auth-pl-L86">https://gist.github.com/gideondsouza/6718246#file-dancer2_plugin_gh_auth-pl-L86</a><br></div><div>I set the session there, all works great. </div>
<div><br></div><div>Now, the session is undef here in the app:</div><div><a href="https://gist.github.com/gideondsouza/6718224#file-test_github_plugin-pl-L14">https://gist.github.com/gideondsouza/6718224#file-test_github_plugin-pl-L14</a><br>
</div><div><br></div><div>Is it because I'm calling the init() method here and this method setups up a route?</div><div><a href="https://gist.github.com/gideondsouza/6718224#file-test_github_plugin-pl-L9">https://gist.github.com/gideondsouza/6718224#file-test_github_plugin-pl-L9</a><br>
</div><div><br></div><div>Is there a way to add routes inside a plugin, on init or something like that? Or perhaps it's something else I've missed?</div><div><br></div><div>Any reply or pointers appreciated.</div>
<div><br></div><div>Gideon</div><div><br></div><div><br></div><div><br></div></div>