SkygearIO/skygear-server

Add anonymous user flag

kiootic opened this issue · 2 comments

ref #1370

  • Add anonymous user flag in user model
  • Add anonymous user flag header in session resolver
  • Update SDK user model

Since user API model creation is tightly coupled within Auth API handlers. I'll postpone the update of user model until we've decided whether to drop Auth API in #1434 .

Workarounds at the moment:

  • Detect signup of anonymous users: use after_user_create hook and check if any of the identities is of anonymous type.
  • Detect promotion of anonymous user to normal user: use after_identity_delete hook and check if any of the deleted identities is of anonymous type.