Identity Token for Sign In Integration

Hi, how are you people? i have a problem trying to integrate the Sign In on my app. My app is a game and need put the login using Apple.

I follow all the documentation:

Create the Service ID with the feature Sign In, Configure the key for that and make the relation between the Key and the Service.

But when try to use the IdentityToken on my Login Flow always give me an error NotAuthorized.

"code":403,"status":"Forbidden","error":"NotAuthorized","errorCode":1089,"errorMessage":"IDX10501: Signature validation failed. Unable to match key: \nkid: 'VH88FG7NV7'.\nExceptions caught:\n 'System.ArgumentOutOfRangeException: IDX10653: The encryption algorithm 'HS256' requires a key size of at least '128' bits. Key 'Microsoft.Ident ityModel.Tokens.JsonWebKey

LogBlueprintUserMessages: [CustomGameInstance_C_3] NotAuthorized LogBlueprintUserMessages: [CustomGameInstance_C_3] IDX10501: Signature validation failed. Unable to match key: kid: 'VH88FG7NV7'. Exceptions caught:  'System.ArgumentOutOfRangeException: IDX10653: The encryption algorithm 'HS256' requires a key size of at least '128' bits. Key 'Microsoft.IdentityModel.Tokens.JsonWebKey, Use: 'sig',  Kid: 'com.tuumbastudio.thedesertionevil', Kty: 'oct', InternalId: ''.', is of size: '0'. (Parameter 'key')

For generate my Identity Token im use this code in Ruby:

require 'jwt'

key_file = 'key.p8' 
team_id = 'TeamID'
client_id = 'AppID'
key_id = 'KeyID'

ecdsa_key = OpenSSL::PKey::EC.new IO.read key_file

headers = {
 'kid' => key_id
}

claims = {
'iss' => team_id,
'iat' => Time.now.to_i,
'exp' => Time.now.to_i + 86400*180,
'aud' => 'https://appleid.apple.com',
'sub' => client_id,
}

token = JWT.encode claims, ecdsa_key, 'ES256', headers

puts token

This give me a token after that i check the token over http://jwt.io

But in this part say the signature is invalid. Why if im using the key generated and configured on the apple key side.

What flow need use to create the IdentityToken valid to use on my app login flow?

Thx BR

Identity Token for Sign In Integration
 
 
Q