-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle fragment encoded auth responses.
Serve a simple HTML page with Javascript manually POSTing the raw auth response from the URL fragment.
- Loading branch information
Showing
6 changed files
with
158 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<html> | ||
<script> | ||
var req = new XMLHttpRequest(); | ||
// using POST so query isn't logged | ||
req.open('POST', '/redirect_uri', true); | ||
req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); | ||
|
||
req.onreadystatechange = function () { | ||
if (req.readyState === this.DONE) { | ||
var location = req.responseText; | ||
console.log(location); | ||
window.location = location; | ||
} | ||
}; | ||
req.send(location.hash.substring(1)); | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This added a implicit dependency on setuptools I believe, at least I suddenly ran into an error that this module wasn't found. This issue suggested the coupling of this package to
setuptools
: dylanaraps/pywal#259