@@ -1203,7 +1203,9 @@ async def test_oidc_verification(
12031203 app ["id" ], app ["secret" ], str (uuid .uuid4 ())
12041204 )
12051205
1206+ nonce = await martine_phone .create_oidc_nonce ()
12061207 await martine_phone .start (identity )
1208+ await martine_phone ._set_oidc_test_nonce (nonce )
12071209 await martine_phone .register_identity (OidcIdTokenVerification (oidc_id_token ))
12081210 await martine_phone .stop ()
12091211
@@ -1213,6 +1215,8 @@ async def test_oidc_verification(
12131215 await martine_laptop .start (identity )
12141216
12151217 assert martine_laptop .status == TankerStatus .IDENTITY_VERIFICATION_NEEDED
1218+ nonce = await martine_laptop .create_oidc_nonce ()
1219+ await martine_laptop ._set_oidc_test_nonce (nonce )
12161220 await martine_laptop .verify_identity (OidcIdTokenVerification (oidc_id_token ))
12171221 assert martine_laptop .status == TankerStatus .READY
12181222
@@ -1223,44 +1227,6 @@ async def test_oidc_verification(
12231227 await martine_laptop .stop ()
12241228
12251229
1226- @pytest .mark .asyncio
1227- async def test_oidc_preshare (tmp_path : Path , app : Dict [str , str ], admin : Admin ) -> None :
1228- email , oidc_id_token = set_up_oidc (app , admin , "martine" )
1229- alice = await create_user_session (tmp_path , app )
1230-
1231- provisional_identity = tankersdk_identity .create_provisional_identity (
1232- app ["id" ], email
1233- )
1234- public_provisional_identity = tankersdk_identity .get_public_identity (
1235- provisional_identity
1236- )
1237-
1238- message = b"hello OIDC user"
1239- encrypted = await alice .session .encrypt (
1240- message , EncryptionOptions (share_with_users = [public_provisional_identity ])
1241- )
1242-
1243- martine_phone = create_tanker (app ["id" ], persistent_path = tmp_path )
1244- identity = tankersdk_identity .create_identity (
1245- app ["id" ], app ["secret" ], str (uuid .uuid4 ())
1246- )
1247-
1248- status = await martine_phone .start (identity )
1249- assert status == TankerStatus .IDENTITY_REGISTRATION_NEEDED
1250- await martine_phone .register_identity (OidcIdTokenVerification (oidc_id_token ))
1251- attach_result = await martine_phone .attach_provisional_identity (
1252- provisional_identity
1253- )
1254- assert attach_result .status == TankerStatus .IDENTITY_VERIFICATION_NEEDED
1255- await martine_phone .verify_provisional_identity (
1256- OidcIdTokenVerification (oidc_id_token )
1257- )
1258- clear_data = await alice .session .decrypt (encrypted )
1259- assert clear_data == message
1260- await martine_phone .stop ()
1261- await alice .session .stop ()
1262-
1263-
12641230@pytest .mark .asyncio
12651231async def test_register_fails_with_preverified_email (
12661232 tmp_path : Path , app : Dict [str , str ], admin : Admin
0 commit comments