Actualizar OAuth2 Apple del proyecto
Update the project OAuth2 Apple configuration.
/project/oauth2/appleAlcance project.oauth2.writeSDK: solo @owbase/node
Update the project OAuth2 Apple configuration.
Parámetros
Sección titulada «Parámetros»serviceId string
‘Service ID’ of Apple OAuth2 app. For example: ip.owbase.app.web
keyId string
‘Key ID’ of Apple OAuth2 app. For example: P4000000N8
teamId string
‘Team ID’ of Apple OAuth2 app. For example: D4000000R6
p8File string
Contents of the Apple OAuth2 app .p8 private key file. The secret key wrapped by the PEM markers is 200 characters long. For example: —–BEGIN PRIVATE KEY—–MIGTAg…jy2Xbna—–END PRIVATE KEY—–
enabled boolean
Browser-based OAuth2 sign-in status. Set to true to enable new session creation through the redirect flow. Setting to true will trigger end-to-end credentials validation, and will throw if the credentials are invalid. Has no effect on native sign-in, which is controlled by nativeEnabled only.
nativeClientIds string[]
App bundle IDs accepted as ID token audiences for native Sign in with Apple. For example: com.example.app. Together with the Services ID, these are the only client IDs whose tokens are trusted. Pass an empty array to clear the list.
nativeEnabled boolean
Native Sign in with Apple status. This is the only switch for creating sessions from ID tokens obtained on device and is independent of enabled. Needs a Services ID or at least one native client ID to match tokens against, but no key or team ID: this method verifies a signature rather than redeeming an authorization code.
Acceso: clave de API con el alcance project.oauth2.write.
Respuestas
Sección titulada «Respuestas»200Éxito400Parámetro inválido o faltante401Sin sesión, sin permiso en el recurso o clave sin el alcance429Límite de peticionesTodo error llega como JSON con code, type y message: consulta Errores.
import { Client, Project } from '@owbase/node';
const client = new Client() .setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>') // Your project ID .setKey('<YOUR_API_KEY>'); // Your secret API key
const project = new Project(client);
const result = await project.updateOAuth2Apple({ serviceId: '<SERVICE_ID>', // optional keyId: '<KEY_ID>', // optional teamId: '<TEAM_ID>', // optional p8File: '<P8_FILE>', // optional enabled: false, // optional nativeClientIds: [], // optional nativeEnabled: false, // optional});curl -X PATCH "https://cloud.owbase.dev/v1/project/oauth2/apple" \ -H "X-Owbase-Project: <PROJECT_ID>" \ -H "X-Owbase-Key: $OWBASE_API_KEY"{ "$id": "apple", "enabled": false, "serviceId": "ip.owbase.app.web", "keyId": "P4000000N8", "teamId": "D4000000R6", "p8File": "-----BEGIN PRIVATE KEY-----MIGTAg...jy2Xbna-----END PRIVATE KEY-----", "nativeEnabled": false, "nativeClientIds": [ "com.example.app" ]}Las descripciones de esta página vienen de la especificación de la API del servidor (licencia BSD-3-Clause), en inglés, y los ejemplos vienen del generador de SDKs (licencia MIT). Los avisos completos están en el archivo NOTICE de los paquetes @owbase/web y @owbase/node.