safe-global / safe-client-gateway

Serves as a bridge for the Safe{Wallet} clients (Android, iOS, Web)
https://docs.safe.global
MIT License
27 stars 64 forks source link

Add IdentityApi to check rewards eligibility #2103

Closed hectorgomezv closed 1 week ago

hectorgomezv commented 1 week ago

Summary

This PR implements an eligibility check for the Safe clients. The main criterion for eligibility (e.g.: eligible for rewards) is the country of origin of the incoming request.

For that purpose, FingerprintJS is used. This service requires the client to install a JS Agent, that makes a request to Fingerprint servers. The response contains a sealed data payload, holding anonymous identity data like browser type, VPN information, IP location, etc. Then, this data can be sent to the CGW, which unseals it, and applies the eligibility logic.

A more detailed explanation of how this works can be found in the Fingerprint documentation for Sealed Client Results.

Changes

Out of scope