package com.peachpasswords.passkeys import android.app.PendingIntent import android.content.Context import android.content.Intent import androidx.credentials.provider.BeginGetCredentialRequest import com.peachpasswords.credentials.CredentialProviderUnlockActivity object PasskeyUnlockIntent { fun pendingIntent(context: Context, request: BeginGetCredentialRequest): PendingIntent { val intent = Intent(context, CredentialProviderUnlockActivity::class.java) .putExtra(EXTRA_REQUEST, BeginGetCredentialRequest.asBundle(request)) return PendingIntent.getActivity( context, REQUEST_CODE, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE, ) } const val EXTRA_REQUEST = "com.peachpasswords.passkeys.EXTRA_BEGIN_GET_REQUEST" private const val REQUEST_CODE = 0x504b }