@@ -17,7 +17,7 @@ const responses = {
1717
1818describe ( 'AuthenticationProviders' , function ( ) {
1919 [
20- 'apple-signin ' ,
20+ 'apple' ,
2121 'facebook' ,
2222 'facebookaccountkit' ,
2323 'github' ,
@@ -51,7 +51,7 @@ describe('AuthenticationProviders', function() {
5151 } ) ;
5252
5353 it ( `should provide the right responses for adapter ${ providerName } ` , async ( ) => {
54- if ( providerName === 'twitter' || providerName === 'apple-signin ' ) {
54+ if ( providerName === 'twitter' || providerName === 'apple' ) {
5555 return ;
5656 }
5757 spyOn ( require ( '../lib/Adapters/Auth/httpsRequest' ) , 'get' ) . and . callFake (
@@ -1087,22 +1087,22 @@ describe('oauth2 auth adapter', () => {
10871087} ) ;
10881088
10891089describe ( 'apple signin auth adapter' , ( ) => {
1090- const apple = require ( '../lib/Adapters/Auth/apple-signin ' ) ;
1090+ const apple = require ( '../lib/Adapters/Auth/apple' ) ;
10911091 const jwt = require ( 'jsonwebtoken' ) ;
10921092
10931093 it ( 'should throw error with missing id_token' , async ( ) => {
10941094 try {
10951095 await apple . validateAuthData ( { } , { client_id : 'secret' } ) ;
10961096 fail ( ) ;
10971097 } catch ( e ) {
1098- expect ( e . message ) . toBe ( 'id_token is invalid for this user.' ) ;
1098+ expect ( e . message ) . toBe ( 'id token is invalid for this user.' ) ;
10991099 }
11001100 } ) ;
11011101
11021102 it ( 'should not verify invalid id_token' , async ( ) => {
11031103 try {
11041104 await apple . validateAuthData (
1105- { id_token : 'the_token' } ,
1105+ { id : 'the_token' } ,
11061106 { client_id : 'secret' }
11071107 ) ;
11081108 fail ( ) ;
@@ -1120,7 +1120,7 @@ describe('apple signin auth adapter', () => {
11201120 spyOn ( jwt , 'verify' ) . and . callFake ( ( ) => fakeClaim ) ;
11211121
11221122 const result = await apple . validateAuthData (
1123- { id_token : 'the_token' } ,
1123+ { id : 'the_token' } ,
11241124 { client_id : 'secret' }
11251125 ) ;
11261126 expect ( result ) . toEqual ( fakeClaim ) ;
@@ -1134,13 +1134,13 @@ describe('apple signin auth adapter', () => {
11341134
11351135 try {
11361136 await apple . validateAuthData (
1137- { id_token : 'the_token' } ,
1137+ { id : 'the_token' } ,
11381138 { client_id : 'secret' }
11391139 ) ;
11401140 fail ( ) ;
11411141 } catch ( e ) {
11421142 expect ( e . message ) . toBe (
1143- 'id_token not issued by correct OpenID provider - expected: https://appleid.apple.com | from: https://not.apple.com'
1143+ 'id token not issued by correct OpenID provider - expected: https://appleid.apple.com | from: https://not.apple.com'
11441144 ) ;
11451145 }
11461146 } ) ;
@@ -1154,7 +1154,7 @@ describe('apple signin auth adapter', () => {
11541154
11551155 try {
11561156 await apple . validateAuthData (
1157- { id_token : 'the_token' } ,
1157+ { id : 'the_token' } ,
11581158 { client_id : 'secret' }
11591159 ) ;
11601160 fail ( ) ;
0 commit comments