bkkhack / hackmap

App to help collaboration at hacknights.
https://bkkhack.github.io/hackmap/
MIT License
10 stars 9 forks source link

fix bug preventing unauthenticated users from adding hack #51

Closed waf closed 6 years ago

waf commented 6 years ago

when an unauthenticated user submits a hack, we should redirect them to the github login page, and then after they've logged in, we should add the hack they tried to submit.

however, because the ajax client was not authenticated at the beginning of this process, the post-login ajax call fails with an HTTP 401.

to fix this, we no longer hold onto a reference to the ajax client, we just get a new reference when making the post-login ajax call.