Mobile notifications for iOS (#210)
* mobile: wire notification registration and listener
* implement backend components for push notifications
* refactor: agentic comment cleanup
* docs: use proper module name for particle processor
* set required env variables for push notifications
* bump version
* fix: always upsert push token on mobile start
* Revert "fix: always upsert push token on mobile start"
This reverts commit 90ff18a788.
* send push notifications regardless of online status
This commit was merged in pull request #210.
This commit is contained in:
@@ -18,9 +18,8 @@ type sessionReaderImpl struct {
|
||||
redisClient *redis.Client
|
||||
}
|
||||
|
||||
// newSessionReader returns the concrete reader. Used by NewAuthService to
|
||||
// embed without going through the SessionReader interface (which would hide
|
||||
// redisClient from the rest of authServiceImpl).
|
||||
// Exposes the concrete type so authServiceImpl can embed it without
|
||||
// hiding redisClient behind the SessionReader interface.
|
||||
func newSessionReader(redisClient *redis.Client) *sessionReaderImpl {
|
||||
return &sessionReaderImpl{redisClient: redisClient}
|
||||
}
|
||||
|
||||
@@ -47,17 +47,16 @@ type Session struct {
|
||||
type AuthService interface {
|
||||
SessionReader
|
||||
|
||||
// RequestSignInCode generates a code and emails it to the provided email.
|
||||
// To retrieve a session, client must verify with VerifySignInCode.
|
||||
// RequestSignInCode emails a one-time code; the client redeems it via VerifySignInCode.
|
||||
RequestSignInCode(ctx context.Context, email string) error
|
||||
// VerifySignInCode returns ErrInvalidCode if incorrect code, otherwise creates a session.
|
||||
// humanId is stored in the session alongside the email.
|
||||
// VerifySignInCode returns ErrInvalidCode on a wrong code, otherwise creates
|
||||
// a session keyed to (email, humanId).
|
||||
VerifySignInCode(ctx context.Context, email, code, humanId string) (sessionToken string, err error)
|
||||
// ExtendSession returns ErrSessionNotFound if no valid session
|
||||
// ExtendSession returns ErrSessionNotFound if no valid session.
|
||||
ExtendSession(ctx context.Context, sessionToken string) error
|
||||
SignOut(ctx context.Context, sessionToken string) error
|
||||
|
||||
// MintFirebaseCustomToken returns a Firebase custom token with uid=humanId and no custom claims.
|
||||
// MintFirebaseCustomToken issues a Firebase custom token with uid=humanId and no claims.
|
||||
MintFirebaseCustomToken(ctx context.Context, humanId string) (string, error)
|
||||
|
||||
IsSystemAdmin(ctx context.Context, email string) bool
|
||||
|
||||
Reference in New Issue
Block a user