Fix Mozilla Persona login
This commit is contained in:
parent
387600ca10
commit
7648191239
@ -12,8 +12,7 @@ Miniflux.App = (function() {
|
|||||||
onlogin: function(assertion) {
|
onlogin: function(assertion) {
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open("POST", "?action=" + action, true);
|
xhr.open("POST", "?action=" + action + "&token=" + assertion, true);
|
||||||
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
|
||||||
xhr.setRequestHeader("Connection", "close");
|
xhr.setRequestHeader("Connection", "close");
|
||||||
|
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
|
@ -106,7 +106,7 @@ Router\post_action('mozilla-auth', function() {
|
|||||||
|
|
||||||
require 'vendor/PicoTools/AuthProvider.php';
|
require 'vendor/PicoTools/AuthProvider.php';
|
||||||
|
|
||||||
list($valid, $token) = AuthProvider\mozilla_validate(Request\value('token'));
|
list($valid, $token) = AuthProvider\mozilla_validate(Request\param('token'));
|
||||||
|
|
||||||
if ($valid && $token === Model\Config\get('auth_mozilla_token')) {
|
if ($valid && $token === Model\Config\get('auth_mozilla_token')) {
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ Router\post_action('mozilla-link', function() {
|
|||||||
|
|
||||||
require 'vendor/PicoTools/AuthProvider.php';
|
require 'vendor/PicoTools/AuthProvider.php';
|
||||||
|
|
||||||
list($valid, $token) = AuthProvider\mozilla_validate(Request\value('token'));
|
list($valid, $token) = AuthProvider\mozilla_validate(Request\param('token'));
|
||||||
|
|
||||||
if ($valid) {
|
if ($valid) {
|
||||||
Model\Config\save_auth_token('mozilla', $token);
|
Model\Config\save_auth_token('mozilla', $token);
|
||||||
|
Loading…
Reference in New Issue
Block a user