169 похожих чатов

Hello everyone, how to do authentication on backend from frontend by

web3?

7 ответов

3 просмотра

authentication of what?

Amin-Malekzadeh Автор вопроса
William Oney
authentication of what?

Actually, I want authentication user on backend but this authentication of frontend by web3, should we use jwt again?

What kind of authentication is it? E.g. for google, front-end gets token from google, sends token to back-end, back-end contacts google to check if token is authentic.

Amin-Malekzadeh Автор вопроса
William Oney
What kind of authentication is it? E.g. for googl...

by metamask or wallet connect and another connectors

Amin Malekzadeh
by metamask or wallet connect and another connecto...

Are you trying to authenticate an EOA? Like that the person with some address is really the signer? In that case, you could have back-end send a random challenge msg to client, client signs msg and sends to backend, backend verifies signature.

Amin-Malekzadeh Автор вопроса

Actually, we want mint a NFT but before mint it. first we need to authenticate the user on backend for save data on database

Amin Malekzadeh
Actually, we want mint a NFT but before mint it. f...

Ok, so you would authenticate on a per-address basis, so yes, if user changes accounts in metamask, you'd want to reauth if it's a new address that you haven't authed before for that user. So in a DB you'd want some kind of structure like {user: {authedAddresses:[0xabcd123..., 0xfedc987...]} Then if the user logs in the next day, they wont have to reauth their accounts again (assuming they're logging in to whatever service you're providing)

Похожие вопросы

Обсуждают сегодня

А чем вам питонисты не угодили?😂
.
79
Язык Си можно выучить за день? По книжке ANSI C на 230 страниц
Vincent Vegan
29
Всем привет, написал код ниже, но он выдает сегфолт, в чем причина? #include <stdio.h> #include <stdlib.h> #include <string.h> struct product { char *name; float price; };...
buzz базз
75
Dim Dim, [02.07.2024 11:07] DB 0x62 Dim Dim, [02.07.2024 11:07] DB 0x66 Dim Dim, [02.07.2024 11:07] кто пояснит что это?
Dim Dim
14
Ошибка: segmentation fault (core dumped) Код: pastebin.com/BEsNNSSV Сообщение от компилятора: отсутствует ОС: Arch Linux Ядро: x86_64 Linux 6.9.7-arch1-1 Процессор: Intel Cele...
sec
4
Ребят, а за скок можно впарить анон чат с апишкой и веб админкой ?
Eugene Неелов
15
@ahndmn @ayaw0_0 здарова, на чем пишете?
Aiwan \ (•◡•) / _bot
7
Кстати, я тут еще с одной темой столкнулся, вот учу я C++, на таком то ресурсе, а остальные постоянно советуют практиковаться, что то писать, проекты, но как писать если вот т...
aaswq1
7
Ещё такой вопрос. Мне необходимо хранить пароль пользователя локально. Для этого планирую использовать ini файл. Это для автозаполнения полей логин и пароль при авторизации. Е...
Евгений
19
с помощью чего можно бота добавить как админа в чат? (условно в боте есть кнопка, нажатие на которую приводит тебя к выбору чата и выдаче прав боту)
ηє νєямσяє
5
Карта сайта