Compare commits

...

2 Commits

Author SHA1 Message Date
94f70d2565 Increase version to 0.2.1 2019-02-07 21:38:48 +01:00
b245755fce Try to build a better redirect url 2019-02-07 21:38:13 +01:00
3 changed files with 17 additions and 3 deletions

View File

@ -19,8 +19,17 @@
oneditprepare: function () {
var id = this.id;
var pathname = document.location.pathname;
if (pathname.slice(-1) != "/") {
pathname += "/";
}
var callback = location.protocol + "//" +
location.hostname +
(location.port?":"+location.port:"")+
pathname + "indieauth/auth/callback";
$('#node-config-start-auth').mousedown(function () {
var callback = 'https://localhost:1881/indieauth/auth/callback';
var clientId = $("#node-config-input-client_id").val();
var me = $("#node-config-input-me").val();
var url = 'indieauth/auth?id=' + id + '&client_id=' + clientId + "&me=" + me + "&callback=" + encodeURIComponent(callback);
@ -31,6 +40,11 @@
</script>
<script type="text/x-red" data-template-name="indieauth">
<div class="form-tips" id="node-config-indieauth-tooltip">
Fill in your Client ID, Me url and click Web Sign In. You will be redirect to your authorization endpoint. When authorization is complete you can close the new tab and
click Done.
</div>
<div class="form-row">
<label for="node-config-input-client_id"><i class="icon-bookmark"></i> Client ID</label>
<input type="text" id="node-config-input-client_id">

View File

@ -35,7 +35,7 @@ module.exports = function (RED) {
RED.nodes.addCredentials(node_id, credentials);
}).catch(err => {
RED.log.error(err);
res.send(err);
res.send("error while getting authurl");
});
});

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-contrib-micropub",
"version": "0.2.0",
"version": "0.2.1",
"dependencies": {
"micropub-helper": "1.5.3"
},