Add Web Monetization token

This commit is contained in:
Ben Hardill
2020-02-28 22:09:19 +00:00
parent 191030d46f
commit 623bc18954
3 changed files with 4 additions and 3 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
node_modules/*
log/*
test.sh
test-aws.sh

View File

@@ -112,7 +112,7 @@ server.exchange(oauth2orize.exchange.refreshToken({
//console.log("Yay!");
OAuth.RefreshToken.findOne({token: token}, function(error, refresh){
if (refresh && refresh.application == application.id) {
OAuth.GrantCode.findOne({},function(error, grant){
OAuth.GrantCode.findOne({user: refresh.user},function(error, grant){
if (grant && grant.active && grant.application == application.id){
var newToken = new OAuth.AccessToken({
application: refresh.application,

View File

@@ -2,6 +2,7 @@
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="monetization" content="$coil.xrptipbot.com/KZutpQmJRyqRZAK5KGKfug">
<title>Node-RED Alexa Home Skill Bridge</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
@@ -49,4 +50,4 @@
<a href="/login">Login</a> or <a href="/newuser">Register</a>
<% } %>
</div>
<div class="container main">
<div class="container main">