@@ -984,23 +984,6 @@ func TestStrategy(t *testing.T) {
984
984
require .Equal (t , "No nonce was included in the id_token but is required by the provider" , gjson .GetBytes (body , "error.reason" ).String (), "%s" , body )
985
985
},
986
986
},
987
- {
988
- name : "should fail if no nonce is supplied in request" ,
989
- idToken : `{
990
- "iss": "https://appleid.apple.com",
991
- "sub": "{{sub}}",
992
- "nonce": "{{nonce}}"
993
- }` ,
994
- v : func (provider , token , _ string ) url.Values {
995
- return url.Values {
996
- "id_token" : {token },
997
- "provider" : {provider },
998
- }
999
- },
1000
- expect : func (t * testing.T , res * http.Response , body []byte ) {
1001
- require .Equal (t , "No nonce was provided but is required by the provider" , gjson .GetBytes (body , "error.reason" ).String (), "%s" , body )
1002
- },
1003
- },
1004
987
{
1005
988
name : "should pass if claims are valid" ,
1006
989
idToken : `{
@@ -1012,17 +995,6 @@ func TestStrategy(t *testing.T) {
1012
995
require .NotEmpty (t , gjson .GetBytes (body , "session_token" ).String (), "%s" , body )
1013
996
},
1014
997
},
1015
- {
1016
- name : "nonce mismatch" ,
1017
- idToken : `{
1018
- "iss": "https://appleid.apple.com",
1019
- "sub": "{{sub}}",
1020
- "nonce": "random-nonce"
1021
- }` ,
1022
- expect : func (t * testing.T , res * http.Response , body []byte ) {
1023
- require .Equal (t , "The supplied nonce does not match the nonce from the id_token" , gjson .GetBytes (body , "error.reason" ).String (), "%s" , body )
1024
- },
1025
- },
1026
998
} {
1027
999
tc := tc
1028
1000
t .Run (fmt .Sprintf ("flow=registration/case=%s" , tc .name ), func (t * testing.T ) {
0 commit comments