Похожие чаты

Guys i need help!. I wanna store unique id on both

sides(server and android) to prevent other users not to use the same account on another device. This the requirement.

Where should i store the unique id ?.
I want to persist the unique id after the user uninstall the app. Android restricted most permissions to system apps.

6 ответов

24 просмотра

You can use UUID using either with your backend or firebase and store that in mysql or preferences in Android

Ninja Man- Автор вопроса
Ninja Man
What if the app is reinstalled ?

Send deviceId when you generate a new UUID. Then everytime a user opens the app check if the deviceId exists, if true send the original UUID else send a new UUID

Ninja Man- Автор вопроса
YohannesTz
Send deviceId when you generate a new UUID. Then e...

Let's take Netflix as an example. Let's you are asked to add functionality to prevent multiple users not to use the same account in other devices. How are going to implement that?.

Ninja Man
Let's take Netflix as an example. Let's you are as...

I will first take the deviceID and the user data when ever a new user signs up. Then generate a UUID (or token) and send it to mobile. Then when ever the user starts the app/signup I will send that token/uuid and deviceId to cross check with the deviceId. If everything is correct, I will send back some response to client to let it continue. If not. Send some message like "token and device id doesn't match" or redirect to signUp. JWT is good for those type of projects. You can put the metadata (userId, deviceId) in the token. Even better, you can give it TTL (time to live) and send a refresh token for better security

Ninja Man- Автор вопроса
YohannesTz
I will first take the deviceID and the user data w...

I use my own backend application. Ofc I use jwt with allow list strategy. I did the setup in my backend application. The problem is in the Android side. It seems you haven't read google updates. You can't use devise id in recent APIs Jo.

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

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

Если у меня есть такой класс: Object = {} function Object:new(a_name, a_transform, a_color, a_mesh, a_material, a_shader, a_textures) local private = {} private.n...
Cuarno Vile
4
А кто-то пробовал, уезжая из Эстонии получить э-рез и продолжить вести предпринимательскую деятельность внутри Эстонии, используя свой OÜ?
Lalalashechki Lalala
62
Is Kadena onto something special? No one really knows. Good luck!
Bright Uncle Stephen EqualBet
40
At which price point will BCH, an ASIC mined coin, be succeptible to reorg attacks because of low hashrate? $10? $1? $0.1? $0.01?
Kishniev
18
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
Гайз, кто-нибудь пробовал запустить probe-rs под камень, которого нет в probe-rs? Мб есть какой-нибудь пример у кого... Через target-gen попробовал сгенерировать chip-descript...
Максим Смирнов
2
зачем же переименовывать ? чтобы кол-во участников возросло или вдруг IBM от этого снова на свифте начнет кодить ? Я не понимаю что страшного в том что свифт гавно, если это т...
Oleh Nerzh
10
I hodl ocean for a long time. Is there new development that I should read?
A33
12
Is there an article I can read for more information?
Lobaka
10
здравствуйте. совершаю вот такую вещь: strcpy(line, (char)current_number); где current number — неподписанный шорт, line — массив чаров. ругань следующая: main.c:29:30: error...
Roberto's Ширгозиев
13
Карта сайта