Compare commits

...

4 Commits

Author SHA1 Message Date
Keyan
d8c604172a
Update awards.csv - pay up 2025-03-10 14:48:35 -05:00
ekzyis
3a93b04e07
Merge pull request #1960 from stackernews/fix-welcome
Fix fetching of user items in welcome script
2025-03-09 23:29:14 -05:00
ekzyis
0801191b9e Fix fetching of user items in welcome script 2025-03-09 23:06:50 -05:00
ekzyis
7b725746b0
Remove unnecessary wrapping with NodeNext(Request|Response) (#1956) 2025-03-09 10:53:14 -05:00
4 changed files with 24 additions and 19 deletions

View File

@ -175,17 +175,17 @@ SatsAllDay,issue,#1820,#1819,easy,,,1,9k,weareallsatoshi@getalby.com,2025-01-27
Soxasora,pr,#1814,#1736,easy,,,,100k,soxasora@blink.sv,2025-01-27 Soxasora,pr,#1814,#1736,easy,,,,100k,soxasora@blink.sv,2025-01-27
jason-me,pr,#1857,,easy,,,,100k,rrbtc@vlt.ge,2025-02-08 jason-me,pr,#1857,,easy,,,,100k,rrbtc@vlt.ge,2025-02-08
ed-kung,pr,#1901,#323,good-first-issue,,,,20k,simplestacker@getalby.com,2025-02-14 ed-kung,pr,#1901,#323,good-first-issue,,,,20k,simplestacker@getalby.com,2025-02-14
Scroogey-SN,pr,#1911,#1905,good-first-issue,,,1,18k,Scroogey@coinos.io,??? Scroogey-SN,pr,#1911,#1905,good-first-issue,,,1,18k,Scroogey@coinos.io,2025-03-10
Scroogey-SN,pr,#1928,#1924,good-first-issue,,,,20k,Scroogey@coinos.io,??? Scroogey-SN,pr,#1928,#1924,good-first-issue,,,,20k,Scroogey@coinos.io,2025-03-10
dtonon,issue,#1928,#1924,good-first-issue,,,,2k,???,??? dtonon,issue,#1928,#1924,good-first-issue,,,,2k,???,???
ed-kung,pr,#1926,#1914,medium-hard,,,,500k,simplestacker@getalby.com,??? ed-kung,pr,#1926,#1914,medium-hard,,,,500k,simplestacker@getalby.com,2025-03-10
ed-kung,issue,#1926,#1914,medium-hard,,,,50k,simplestacker@getalby.com,??? ed-kung,issue,#1926,#1914,medium-hard,,,,50k,simplestacker@getalby.com,2025-03-10
ed-kung,pr,#1926,#1927,easy,,,,100k,simplestacker@getalby.com,??? ed-kung,pr,#1926,#1927,easy,,,,100k,simplestacker@getalby.com,2025-03-10
ed-kung,issue,#1926,#1927,easy,,,,10k,simplestacker@getalby.com,??? ed-kung,issue,#1926,#1927,easy,,,,10k,simplestacker@getalby.com,2025-03-10
ed-kung,issue,#1913,#1890,good-first-issue,,,,2k,simplestacker@getalby.com,??? ed-kung,issue,#1913,#1890,good-first-issue,,,,2k,simplestacker@getalby.com,2025-03-10
Scroogey-SN,pr,#1930,#1167,good-first-issue,,,,20k,Scroogey@coinos.io,??? Scroogey-SN,pr,#1930,#1167,good-first-issue,,,,20k,Scroogey@coinos.io,2025-03-10
itsrealfake,issue,#1930,#1167,good-first-issue,,,,2k,smallimagination100035@getalby.com,??? itsrealfake,issue,#1930,#1167,good-first-issue,,,,2k,smallimagination100035@getalby.com,???
Scroogey-SN,pr,#1948,#1849,medium,urgent,,,750k,Scroogey@coinos.io,??? Scroogey-SN,pr,#1948,#1849,medium,urgent,,,750k,Scroogey@coinos.io,2025-03-10
felipebueno,issue,#1947,#1945,good-first-issue,,,,2k,felipebueno@blink.sv,??? felipebueno,issue,#1947,#1945,good-first-issue,,,,2k,felipebueno@blink.sv,2025-03-10
ed-kung,pr,#1952,#1951,easy,,,,100k,simplestacker@getalby.com,??? ed-kung,pr,#1952,#1951,easy,,,,100k,simplestacker@getalby.com,2025-03-10
ed-kung,issue,#1952,#1951,easy,,,,10k,simplestacker@getalby.com,??? ed-kung,issue,#1952,#1951,easy,,,,10k,simplestacker@getalby.com,2025-03-10

1 name type pr id issue ids difficulty priority changes requested notes amount receive method date paid
175 Soxasora pr #1814 #1736 easy 100k soxasora@blink.sv 2025-01-27
176 jason-me pr #1857 easy 100k rrbtc@vlt.ge 2025-02-08
177 ed-kung pr #1901 #323 good-first-issue 20k simplestacker@getalby.com 2025-02-14
178 Scroogey-SN pr #1911 #1905 good-first-issue 1 18k Scroogey@coinos.io ??? 2025-03-10
179 Scroogey-SN pr #1928 #1924 good-first-issue 20k Scroogey@coinos.io ??? 2025-03-10
180 dtonon issue #1928 #1924 good-first-issue 2k ??? ???
181 ed-kung pr #1926 #1914 medium-hard 500k simplestacker@getalby.com ??? 2025-03-10
182 ed-kung issue #1926 #1914 medium-hard 50k simplestacker@getalby.com ??? 2025-03-10
183 ed-kung pr #1926 #1927 easy 100k simplestacker@getalby.com ??? 2025-03-10
184 ed-kung issue #1926 #1927 easy 10k simplestacker@getalby.com ??? 2025-03-10
185 ed-kung issue #1913 #1890 good-first-issue 2k simplestacker@getalby.com ??? 2025-03-10
186 Scroogey-SN pr #1930 #1167 good-first-issue 20k Scroogey@coinos.io ??? 2025-03-10
187 itsrealfake issue #1930 #1167 good-first-issue 2k smallimagination100035@getalby.com ???
188 Scroogey-SN pr #1948 #1849 medium urgent 750k Scroogey@coinos.io ??? 2025-03-10
189 felipebueno issue #1947 #1945 good-first-issue 2k felipebueno@blink.sv ??? 2025-03-10
190 ed-kung pr #1952 #1951 easy 100k simplestacker@getalby.com ??? 2025-03-10
191 ed-kung issue #1952 #1951 easy 10k simplestacker@getalby.com ??? 2025-03-10

View File

@ -7,7 +7,6 @@ import EmailProvider from 'next-auth/providers/email'
import prisma from '@/api/models' import prisma from '@/api/models'
import nodemailer from 'nodemailer' import nodemailer from 'nodemailer'
import { PrismaAdapter } from '@auth/prisma-adapter' import { PrismaAdapter } from '@auth/prisma-adapter'
import { NodeNextRequest, NodeNextResponse } from 'next/dist/server/base-http/node'
import { getToken, encode as encodeJWT } from 'next-auth/jwt' import { getToken, encode as encodeJWT } from 'next-auth/jwt'
import { datePivot } from '@/lib/time' import { datePivot } from '@/lib/time'
import { schnorr } from '@noble/curves/secp256k1' import { schnorr } from '@noble/curves/secp256k1'
@ -130,7 +129,7 @@ function getCallbacks (req, res) {
const secret = process.env.NEXTAUTH_SECRET const secret = process.env.NEXTAUTH_SECRET
const jwt = await encodeJWT({ token, secret }) const jwt = await encodeJWT({ token, secret })
const me = await prisma.user.findUnique({ where: { id: token.id } }) const me = await prisma.user.findUnique({ where: { id: token.id } })
setMultiAuthCookies(new NodeNextRequest(req), new NodeNextResponse(res), { ...me, jwt }) setMultiAuthCookies(req, res, { ...me, jwt })
} }
return token return token
@ -180,8 +179,7 @@ async function pubkeyAuth (credentials, req, res, pubkeyColumnName) {
const { k1, pubkey } = credentials const { k1, pubkey } = credentials
// are we trying to add a new account for switching between? // are we trying to add a new account for switching between?
const { body } = req.body const multiAuth = typeof req.body.multiAuth === 'string' ? req.body.multiAuth === 'true' : !!req.body.multiAuth
const multiAuth = typeof body.multiAuth === 'string' ? body.multiAuth === 'true' : !!body.multiAuth
try { try {
// does the given challenge (k1) exist in our db? // does the given challenge (k1) exist in our db?
@ -262,7 +260,7 @@ const getProviders = res => [
k1: { label: 'k1', type: 'text' } k1: { label: 'k1', type: 'text' }
}, },
authorize: async (credentials, req) => { authorize: async (credentials, req) => {
return await pubkeyAuth(credentials, new NodeNextRequest(req), new NodeNextResponse(res), 'pubkey') return await pubkeyAuth(credentials, req, res, 'pubkey')
} }
}), }),
CredentialsProvider({ CredentialsProvider({
@ -273,7 +271,7 @@ const getProviders = res => [
}, },
authorize: async ({ event }, req) => { authorize: async ({ event }, req) => {
const credentials = await nostrEventAuth(event) const credentials = await nostrEventAuth(event)
return await pubkeyAuth(credentials, new NodeNextRequest(req), new NodeNextResponse(res), 'nostrAuthPubkey') return await pubkeyAuth(credentials, req, res, 'nostrAuthPubkey')
} }
}), }),
GitHubProvider({ GitHubProvider({

View File

@ -11,6 +11,7 @@ import {
ApolloServerPluginLandingPageLocalDefault, ApolloServerPluginLandingPageLocalDefault,
ApolloServerPluginLandingPageProductionDefault ApolloServerPluginLandingPageProductionDefault
} from '@apollo/server/plugin/landingPage/default' } from '@apollo/server/plugin/landingPage/default'
import { NodeNextRequest } from 'next/dist/server/base-http/node'
const apolloServer = new ApolloServer({ const apolloServer = new ApolloServer({
typeDefs, typeDefs,
@ -85,6 +86,12 @@ export default startServerAndCreateNextHandler(apolloServer, {
export function multiAuthMiddleware (request) { export function multiAuthMiddleware (request) {
// switch next-auth session cookie with multi_auth cookie if cookie pointer present // switch next-auth session cookie with multi_auth cookie if cookie pointer present
if (!request.cookies) {
// required to properly access parsed cookies via request.cookies
// and not unparsed via request.headers.cookie
request = new NodeNextRequest(request)
}
// is there a cookie pointer? // is there a cookie pointer?
const cookiePointerName = 'multi_auth.user-id' const cookiePointerName = 'multi_auth.user-id'
const hasCookiePointer = !!request.cookies[cookiePointerName] const hasCookiePointer = !!request.cookies[cookiePointerName]

View File

@ -176,7 +176,7 @@ async function fetchItem (id) {
async function fetchUserItems (name) { async function fetchUserItems (name) {
const data = await gql(` const data = await gql(`
query UserItems($name: String!) { query UserItems($name: String!) {
items(sort: "user", name: $name) { items(sort: "user", type: "all", limit: 999, name: $name) {
items { items {
id id
createdAt createdAt