OneSignal’e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT’ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.
OneSignal, kullanıcı kimliğine bürünmeyi önlemeye yardımcı olmak için Kimlik Doğrulama adlı gelişmiş bir güvenlik özelliği sunar. Bu özellik, sunucunuzda güvenli bir şekilde oluşturulan JSON Web Token’ları - veya JWT’ler’i kullanır. Abonelik bilgilerini doğrulamak için bu token’lar uygulamanıza ve OneSignal’in API’sine iletilir.Kimlik Doğrulamayı etkinleştirerek korunun:
Kullanıcıları oturum açtırma
E-posta abonelikleri ekleme
SMS abonelikleri ekleme
Kullanıcı kimliklerini değiştirme
Kimlik Doğrulama şu anda beta aşamasındadır. Hesabınızda etkinleştirmek için support@onesignal.com ile iletişime geçin. Destek etkinleştirdikten sonra, bunu kontrol panelinizde etkinleştirirsiniz (Adım 5’e bakın).
OneSignal hesabınızda oturum açın ve Ayarlar > Anahtarlar ve Kimlikler > Kimlik Doğrulama’ya gidin.
Kimlik Doğrulama yapılandırması
Yeni bir anahtar çifti oluşturmak için Yeni Anahtarlar Oluştur’a tıklayın.
Yeni anahtar çifti oluşturma
PEM dosyasını indirin veya özel anahtarı kopyalayın, özel anahtarı güvenli bir şekilde sakladığınızdan emin olun.
Kimlik Doğrulama anahtar çifti
Özel anahtarlarınızı her zaman anahtar yönetim sistemi gibi güvenli bir ortamda saklayın. Özel anahtarları istemci tarafı kodda, genel depolarda veya günlüklerde asla açığa çıkarmayın.
2
Arka ucunuzda doğrulama JWT'si oluşturun
Kimlik doğrulama, son kullanıcıyı OneSignal’e oturum açtırmadan önce kimlik doğrulama sunucunuzla doğrulamanızı gerektirir. Son kullanıcı arka ucunuzla kimlik doğruladığında, token’ı oluşturun ve cihaza gönderilen kimlik doğrulama yanıtına dahil edin. Uygulamanız bir arka uç sunucusu çalıştırmıyorsa, kullanıcıları doğrulamak ve bu token’ları oluşturmak için hafif bir sunucu kurmayı düşünün.
JWT’yi ES256 algoritmasını kullanarak imzalayın. JWT’yi OneSignal’e gönderirken doğrulama sorunlarından kaçınmak için arka ucunuzun bu imzalama yöntemini kullanacak şekilde yapılandırıldığından emin olun. Bunu yapmak için bir JWT Kütüphanesi öneririz.jsonwebtoken kullanan örnek:
import jwt from 'jsonwebtoken';const APP_ID = process.env['ONESIGNAL_APP_ID']const IDENTITY_VERIFICATION_SECRET = process.env['ONESIGNAL_IDENTITY_VERIFICATION_SECRET_KEY']// Generates JWT, potentially with subscription claims, for the user identified by the External IDfunction signOneSignalJWT(externalId, subscriptions) {return jwt.sign({iss: APP_ID,exp: Math.floor(Date.now() / 1000) + 3600, // 1-hour expirationidentity: {'external_id': externalId,},subscriptions},IDENTITY_VERIFICATION_SECRET,{ algorithm: 'ES256' });}// Pass this token to your mobile app to use with the `login` SDK methodconst onesignalJWT = signOneSignalJWT('EXTERNAL_ID');
Özel anahtar, Kontrol Panelinden indirdiğimiz önceki adımın dosyasındadır.
İdeal olarak, e-posta veya telefon numarası gibi abonelik ayrıntıları, bir kullanıcıyı oturum açtırırken JWT yüküne dahil edilir. Bu ayrıntılar önceden mevcut değilse, doğrulama sunucunuz abonelik bilgileri kullanılabilir hale geldikçe token’ları dinamik olarak oluşturmak için bir uç nokta sağlamalıdır.Örnek: Abonelik eklemek için JWT oluşturma
Arka ucunuz JWT’yi oluşturduktan sonra, bununla login yöntemini çağırın. Bu token, e-posta veya SMS aboneliği ekleme gibi herhangi bir değişiklik yapılmadan önce kullanıcının kimliğinin doğrulanmasını sağlar.Oturum açma örneği:
You’ll need to implement a dedicated endpoint on your backend to handle scenarios like token invalidation. This endpoint should provide a refreshed JWT when OneSignal requests an update.Example of handling token invalidation and refreshing the JWT:
OneSignal.addUserJwtInvalidatedListener(event -> { // Get the expired user's External ID String externalId = event.getExternalId(); // Fetch a new JWT from your backend for the user String onesignalJWT = "yourUpdatedToken"; // Provide the new JWT to the SDK OneSignal.updateUserJwt(externalId, onesignalJWT);});
OneSignal.addUserJwtInvalidatedListener( object : IUserJwtInvalidatedListener { override fun onUserJwtInvalidated(event: UserJwtInvalidatedEvent) { val externalId = event.externalId val onesignalJWT = "" updateUserJwt(externalId, onesignalJWT) } },)
class AppDelegate: UIResponder, UIApplicationDelegate, OSUserJwtInvalidatedListener { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { // Set self to listen for JWT invalidated events OneSignal.addUserJwtInvalidatedListener(self) // Remove the JWT listener as needed by calling: // `OneSignal.removeUserJwtInvalidatedListener(self)` } // Required to conform to `OSUserJwtInvalidatedListener` protocol func onUserJwtInvalidated(event: OneSignalUser.OSUserJwtInvalidatedEvent) { // Get the expired user's External ID let externalId = event.externalId // Fetch a new JWT from your backend for the user let onesignalJWT = "yourUpdatedToken" // Provide the new JWT to the SDK OneSignal.updateUserJwt(externalId: externalId, token: onesignalJWT) }}
@interface MyListener: NSObject<OSUserJwtInvalidatedListener>@end@implementation MyListener- (void)onUserJwtInvalidatedWithEvent:(OSUserJwtInvalidatedEvent * _Nonnull)event { // Get the expired user's External ID NSString *externalId = event.externalId; // Fetch a new JWT from your backend for the user NSString *onesignalJWT = @"yourUpdatedToken"; // Provide the new JWT to the SDK [OneSignal updateUserJwt:externalId withToken:onesignalJWT];}// Add or remove your User Jwt Invalidated Listener[OneSignal addUserJwtInvalidatedListener:myListener];[OneSignal removeUserJwtInvalidatedListener:myListener];
This ensures that when a user’s JWT is invalidated, a new one can be fetched from your backend and passed to OneSignal. You can also use this function to generate a token with an email and phone number, allowing you to manage email and SMS subscriptions if the token created during authentication does not contain them.
5
Enable token identity verification in the dashboard
From Settings > Keys & IDs, toggle Token Identity Verification to enable.
Enabling Token Identity Verification
Etkinleştirildikten sonra, uygulamanızın abonelik özgünlüğünü doğrulamak için OneSignal JWT’lerini göndermesi gerekir. Ek olarak, uygulamanızın kimlik doğrulama token sunucunuz tarafından oluşturulan bir JWT kullanarak login yöntemini çağırması gerekir.
Mobil uygulamanızdan abonelik eklemek için ekstra adımlar atmanıza gerek yoktur; login yöntemini çağırmak bunu sizin için otomatik olarak halleder.
E-posta ekleyin
Telefon numarası ekleyin
OneSignal.getUser().addEmail(emailAddress);
OneSignal.getUser().addEmail(emailAddress)
// If you have not already included it in your JWT token, update the JWT with the emaillet onesignalJWT = "newTokenThatContainsTheEmailToAdd"OneSignal.updateUserJwt(externalId: externalId, token: onesignalJWT)// Add the emailOneSignal.User.addEmail(emailAddress)
// If you have not already included it in your JWT token, update the JWT with the emailNSString *onesignalJWT = @"newTokenThatContainsTheEmailToAdd";[OneSignal updateUserJwt:externalId withToken:onesignalJWT];// Add the email[OneSignal.User addEmail:emailAddress];
OneSignal.getUser().addSms(smsNumber);
OneSignal.getUser().addSms(smsNumber)
// If you have not already included it in your JWT token, update the JWT with the smslet onesignalJWT = "newTokenThatContainsTheSmsToAdd"OneSignal.updateUserJwt(externalId: externalId, token: onesignalJWT)// Add the sms numberOneSignal.User.addSms(smsNumber)
// If you have not already included it in your JWT token, update the JWT with the smsNSString *onesignalJWT = @"newTokenThatContainsTheSmsToAdd";[OneSignal updateUserJwt:externalId withToken:onesignalJWT];// Add the sms number[OneSignal.User addSms:smsNumber];
Token Kimlik Doğrulama etkinleştirildiğinde, aşağıdaki API’lere yapılan tüm istekler başlıklarda bir bearer token olarak sunucu tarafından oluşturulan bir JWT içermelidir, örneğin, Authorization: Bearer <JWT>.
Hayır, ancak şiddetle tavsiye edilir. Olmadan, bir kullanıcının Harici Kimliğini bilen herhangi bir istemci o kullanıcının kimliğine bürünebilir ve aboneliklerini veya verilerini değiştirebilir.
SDK bir JWT geçersizleştirme olayı tetikler. Arka ucunuzdan yenilenmiş bir token almak ve updateUserJwt’ye iletmek için addUserJwtInvalidatedListener’ı uygulayın (JWT yaşam döngüsü olaylarını işleme bölümüne bakın).
Token Kimlik Doğrulama etkinleştirildiğinde, desteklenen API’lere yapılan tüm istekler Authorization başlığında bearer token olarak sunucu tarafından oluşturulan bir JWT içermelidir. JWT, SDK kullanımıyla aynı şekilde oluşturulur.
Kimlik Doğrulama, ES256 algoritmasıyla (P-256 ve SHA-256 kullanan ECDSA) imzalanmış JWT’ler gerektirir. Diğer algoritmalar reddedilecektir.
Bu sayfa yararlı mıydı?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OneSignal Documentation","description":"OneSignal is a platform for sending push notifications, emails, in-app messages, and SMS campaigns via a single API, Journey Builder, and a dashboard.","colors":{"primary":"#3A3DB3","light":"#E54B4D","dark":"#3A3DB3"},"logo":{"light":"https://mintcdn.com/onesignal/yJcueeDCO7UpHnnY/logo/OneSignal-Logo.svg?fit=max\u0026auto=format\u0026n=yJcueeDCO7UpHnnY\u0026q=85\u0026s=1fcfb6fef6d820fd9d99c74850711107","dark":"https://mintcdn.com/onesignal/s4WC_KzLxf8ornqq/logo/OneSignal-Logo-White.svg?fit=max\u0026auto=format\u0026n=s4WC_KzLxf8ornqq\u0026q=85\u0026s=2573a53b5aea961e18c82b3af8f31925"},"favicon":"https://mintcdn.com/onesignal/SGduBFHpiRdg5l6h/favicon.ico?fit=max\u0026auto=format\u0026n=SGduBFHpiRdg5l6h\u0026q=85\u0026s=c0a99fadc0553c658a83741c5611cef4","api":{"examples":{"languages":["curl","typescript","python","php","go","ruby","java","csharp","rust"],"autogenerate":true}},"navbar":{"links":[{"href":"mailto:support@onesignal.com","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://dashboard.onesignal.com"}},"footer":{"socials":{"github":"https://github.com/OneSignal","linkedin":"https://linkedin.com/company/onesignal","youtube":"https://www.youtube.com/@onesignalofficial/playlists"}},"seo":{"metatags":{"apple-mobile-web-app-title":"OneSignal Docs"}},"fonts":{"family":"Nunito Sans"},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"ga4":{"measurementId":"G-2DGWL0VYP5"},"posthog":{"apiKey":"phc_vZpvE0f5eyzcOt30FHer34yddVmNdo9kmlMVRBzLMtn","apiHost":"https://eu.i.posthog.com","sessionRecording":true}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"navigation":{"languages":[{"language":"en","href":"docs/en/home"},{"language":"cn","href":"docs/cn/home"},{"language":"ko","href":"docs/ko/home"},{"language":"ja","href":"docs/ja/home"},{"language":"tr","href":"docs/tr/home"},{"language":"pt-BR","href":"docs/pt-BR/home"},{"language":"es","href":"docs/es/home"},{"language":"fr","href":"docs/fr/home"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"onesignal","hasAudioNarration":false,"actualSubdomain":"onesignal","customDomains":["documentation.onesignal.com"],"gitSource":{"type":"github","owner":"onesignal","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af263cb6575a850b3cad407","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"en","tag":"User Guides","count":203},{"language":"es","tag":"Guías del Usuario","count":178},{"language":"fr","tag":"Guides utilisateur","count":178},{"language":"ja","tag":"ユーザーガイド","count":178},{"language":"ko","tag":"사용자 가이드","count":178},{"language":"pt-BR","tag":"Guia do Usuário","count":178},{"language":"tr","tag":"Kullanıcı Kılavuzları","count":178},{"language":"cn","tag":"用户指南","count":176},{"language":"en","tag":"Message channels","count":90},{"language":"es","tag":"Canales de mensajería","count":84},{"language":"fr","tag":"Canaux de messagerie","count":84},{"language":"ja","tag":"メッセージングチャネル","count":84},{"language":"ko","tag":"메시지 채널","count":84},{"language":"pt-BR","tag":"Canais de mensagem","count":84},{"language":"tr","tag":"Mesaj kanalları","count":84},{"language":"cn","tag":"消息渠道","count":83},{"language":"default","tag":"API Reference","count":68},{"language":"default","tag":"API reference","count":64},{"language":"en","tag":"Analytics \u0026 Integrations","count":53},{"language":"es","tag":"Analítica \u0026 Integraciones","count":52},{"language":"fr","tag":"Analyses et intégrations","count":52},{"language":"ja","tag":"分析 \u0026 統合","count":52},{"language":"ko","tag":"분석 \u0026 통합","count":52},{"language":"pt-BR","tag":"Análises \u0026 Integrações","count":52},{"language":"tr","tag":"Analitik ve Entegrasyonlar","count":52},{"language":"cn","tag":"分析和集成","count":51},{"language":"cn","tag":"开发者指南","count":48},{"language":"es","tag":"Guías del desarrollador","count":48},{"language":"fr","tag":"Guides développeur","count":48},{"language":"ja","tag":"開発者ガイド","count":48},{"language":"ko","tag":"개발자 가이드","count":48},{"language":"tr","tag":"Geliştirici Kılavuzları","count":48},{"language":"en","tag":"Developer Guides","count":47},{"language":"pt-BR","tag":"Guia de desenvolvedor","count":47},{"language":"en","tag":"Integrations","count":37},{"language":"es","tag":"Integraciones","count":37},{"language":"fr","tag":"Intégrations","count":37},{"language":"ja","tag":"統合","count":37},{"language":"ko","tag":"통합","count":37},{"language":"pt-BR","tag":"Integrações","count":37},{"language":"tr","tag":"Entegrasyonlar","count":37},{"language":"cn","tag":"集成","count":36},{"language":"en","tag":"Tutorials","count":35},{"language":"cn","tag":"推送通知","count":31},{"language":"cn","tag":"OneSignal 作为目的地","count":31},{"language":"en","tag":"Push","count":31},{"language":"en","tag":"OneSignal as destination","count":31},{"language":"es","tag":"Push notificaciones","count":31},{"language":"es","tag":"OneSignal como destino","count":31},{"language":"fr","tag":"Push","count":31},{"language":"fr","tag":"OneSignal comme destination","count":31},{"language":"ja","tag":"プッシュ通知","count":31},{"language":"ja","tag":"OneSignal as 宛先","count":31},{"language":"ko","tag":"푸시","count":31},{"language":"ko","tag":"OneSignal을 데이터 목적지로 사용","count":31},{"language":"pt-BR","tag":"Push notificações","count":31},{"language":"pt-BR","tag":"OneSignal como destino","count":31},{"language":"tr","tag":"Anlık bildirimler","count":31},{"language":"tr","tag":"OneSignal hedef","count":31},{"language":"en","tag":"Mobile SDKs","count":26},{"language":"cn","tag":"移动SDK","count":25},{"language":"es","tag":"SDKs móviles","count":25},{"language":"fr","tag":"SDK mobiles","count":25},{"language":"ja","tag":"モバイルSDK","count":25},{"language":"ko","tag":"모바일 SDKs","count":25},{"language":"pt-BR","tag":"SDKs móveis","count":25},{"language":"tr","tag":"Mobil SDK'lar","count":25},{"language":"cn","tag":"教程","count":24},{"language":"es","tag":"Tutoriales","count":24},{"language":"fr","tag":"Tutoriels","count":24},{"language":"ja","tag":"チュートリアル","count":24},{"language":"ko","tag":"튜토리얼","count":24},{"language":"pt-BR","tag":"Tutoriais","count":24},{"language":"tr","tag":"Eğitimler","count":24},{"language":"en","tag":"Mobile SDK setup","count":19},{"language":"cn","tag":"移动SDK设置","count":18},{"language":"es","tag":"Configuración del SDK móvil","count":18},{"language":"fr","tag":"Configuration SDK mobile","count":18},{"language":"ja","tag":"モバイルSDKセットアップ","count":18},{"language":"ko","tag":"모바일 SDK 설정","count":18},{"language":"pt-BR","tag":"Configuração do SDK móvel","count":18},{"language":"tr","tag":"Mobil SDK kurulumu","count":18},{"language":"default","tag":"Messages","count":9},{"language":"default","tag":"Users","count":9},{"language":"default","tag":"Organization","count":9},{"language":"default","tag":"Journeys","count":8},{"language":"default","tag":"Deprecated","count":6},{"language":"default","tag":"Templates","count":6},{"language":"default","tag":"Subscriptions","count":6},{"language":"default","tag":"Segments","count":5}]},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":true,"email":"support@onesignal.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"docs/tr/identity-verification","slug":"/docs/tr/identity-verification","pageMetadata":{"title":"Kimlik doğrulama","description":"OneSignal'e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT'ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.","keywords":["identity verification","JWT","external user id","user impersonation","login security","authentication","ES256"],"href":"/docs/tr/identity-verification"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"OneSignal’e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT’ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,ParamField,Step,Steps,Tab,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`genel-bakış`,children:`Genel Bakış`}),`\n`,_jsxs(_components.p,{children:[`OneSignal, kullanıcı kimliğine bürünmeyi önlemeye yardımcı olmak için Kimlik Doğrulama adlı gelişmiş bir güvenlik özelliği sunar. Bu özellik, sunucunuzda güvenli bir şekilde oluşturulan JSON Web Token’ları - veya `,_jsx(_components.a,{href:`https://jwt.io/introduction`,children:`JWT’ler`}),`’i kullanır. Abonelik bilgilerini doğrulamak için bu token’lar uygulamanıza ve OneSignal’in API’sine iletilir.`]}),`\n`,_jsx(_components.p,{children:`Kimlik Doğrulamayı etkinleştirerek korunun:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Kullanıcıları oturum açtırma`}),`\n`,_jsx(_components.li,{children:`E-posta abonelikleri ekleme`}),`\n`,_jsx(_components.li,{children:`SMS abonelikleri ekleme`}),`\n`,_jsx(_components.li,{children:`Kullanıcı kimliklerini değiştirme`}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Kimlik Doğrulama şu anda beta aşamasındadır. Hesabınızda etkinleştirmek için `,_jsx(_components.code,{children:`support@onesignal.com`}),` ile iletişime geçin. Destek etkinleştirdikten sonra, bunu kontrol panelinizde etkinleştirirsiniz (`,_jsx(_components.a,{href:`#enable-token-identity-verification-in-the-dashboard`,children:`Adım 5`}),`’e bakın).`]})}),`\n`,_jsx(Heading,{level:`2`,id:`önkoşullar`,children:`Önkoşullar`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Yapılandırılmış push platformu olan mevcut bir OneSignal uygulaması.`}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsx(_components.p,{children:`Desteklenen SDK’lardan biriyle entegre edilmiş bir mobil uygulama:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://github.com/OneSignal/OneSignal-Android-SDK/releases`,children:`OneSignal Android SDK 5.2.0+`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://github.com/OneSignal/OneSignal-iOS-SDK/releases`,children:`OneSignal iOS SDK 5.3.0+`})}),`\n`]}),`\n`]}),`\n`]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Wrapper SDK desteği (Flutter, React Native, Unity, vb.) yakında geliyor.`})}),`\n`,_jsx(Heading,{level:`2`,id:`kurulum`,children:`Kurulum`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Yeni anahtarlar oluşturun`,children:[_jsxs(_components.p,{children:[`OneSignal hesabınızda oturum açın ve `,_jsx(_components.strong,{children:`Ayarlar > Anahtarlar ve Kimlikler > Kimlik Doğrulama`}),`’ya gidin.`]}),_jsx(Frame,{caption:`Kimlik Doğrulama yapılandırması`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=c0be9c91a0dd0449b0120badf8f94b43`,alt:`Settings page showing Keys and IDs with Identity Verification section`,\"data-og-width\":`2401`,width:`2401`,\"data-og-height\":`734`,height:`734`,\"data-path\":`images/docs/d6f1009-keys_and_ids.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?w=280\u0026fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=2ca195dcb87843352cc0d544bf8637b1 280w, https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?w=560\u0026fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=9f5979c55f941ee93ac5607060f0e53a 560w, https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?w=840\u0026fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=5e2afdfd94ef1c8f14fb1b439a911915 840w, https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?w=1100\u0026fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=b194bbcf7b2beb774be103246d41ad3d 1100w, https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?w=1650\u0026fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=b6ff0ee4629b69e7c1360cc609bcb53a 1650w, https://mintcdn.com/onesignal/q_BlLe_fAL4tDvWs/images/docs/d6f1009-keys_and_ids.png?w=2500\u0026fit=max\u0026auto=format\u0026n=q_BlLe_fAL4tDvWs\u0026q=85\u0026s=da4f61ae97603300ccb0283854f8e553 2500w`})}),_jsxs(_components.p,{children:[`Yeni bir anahtar çifti oluşturmak için `,_jsx(_components.strong,{children:`Yeni Anahtarlar Oluştur`}),`’a tıklayın.`]}),_jsx(Frame,{caption:`Yeni anahtar çifti oluşturma`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=73e56aa60fdef2dc8152bf929ebc1d52`,alt:`Generate New Keys button in the Identity Verification section`,\"data-og-width\":`2350`,width:`2350`,\"data-og-height\":`686`,height:`686`,\"data-path\":`images/docs/b24c1fd-Identity_Verification.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?w=280\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=ed67c9b1f27985e8732948d2a32c00df 280w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?w=560\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=6ebe69ac8a3ad8fdba9a1f614e29e184 560w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?w=840\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=ff80c8aa6103603a5373ca915c020d27 840w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?w=1100\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=909c5a15fddbb8d15775570f693cb4f5 1100w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?w=1650\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=c1f058eb0aced1cfc7bc4029e24bfac6 1650w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/b24c1fd-Identity_Verification.png?w=2500\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=538d61d8fb65bcd370ef998830436751 2500w`})}),_jsx(_components.p,{children:`PEM dosyasını indirin veya özel anahtarı kopyalayın, özel anahtarı güvenli bir şekilde sakladığınızdan emin olun.`}),_jsx(Frame,{caption:`Kimlik Doğrulama anahtar çifti`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=b8e99ccdb2f4aafd453063540148ca2e`,alt:`Identity Verification key pair with private key and PEM download`,\"data-og-width\":`1128`,width:`1128`,\"data-og-height\":`966`,height:`966`,\"data-path\":`images/docs/bc217af-id_keys.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?w=280\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=6a9dfe175839461254005d9ca1674505 280w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?w=560\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=f20c98f5367511637b83a5c6654a4de7 560w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?w=840\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=5aab2b4078c2af481d415d1450989a6f 840w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?w=1100\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=da4a94d77d6908e4f0a0941e1d5cae03 1100w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?w=1650\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=c49f1c335808b2ef25bbd1ad82972bfb 1650w, https://mintcdn.com/onesignal/56ctKxZSV4m5VEkn/images/docs/bc217af-id_keys.png?w=2500\u0026fit=max\u0026auto=format\u0026n=56ctKxZSV4m5VEkn\u0026q=85\u0026s=6f7bf0e28c158f734cadd74480702663 2500w`})}),_jsx(Warning,{children:_jsx(_components.p,{children:`Özel anahtarlarınızı her zaman anahtar yönetim sistemi gibi güvenli bir ortamda saklayın. Özel anahtarları istemci tarafı kodda, genel depolarda veya günlüklerde asla açığa çıkarmayın.`})})]}),_jsxs(Step,{title:`Arka ucunuzda doğrulama JWT'si oluşturun`,children:[_jsxs(_components.p,{children:[`Kimlik doğrulama, son kullanıcıyı OneSignal’e oturum açtırmadan `,_jsx(_components.strong,{children:`önce`}),` kimlik doğrulama sunucunuzla doğrulamanızı gerektirir. Son kullanıcı arka ucunuzla kimlik doğruladığında, token’ı oluşturun ve cihaza gönderilen kimlik doğrulama yanıtına dahil edin. Uygulamanız bir arka uç sunucusu çalıştırmıyorsa, kullanıcıları doğrulamak ve bu token’ları oluşturmak için hafif bir sunucu kurmayı düşünün.`]}),_jsx(Heading,{level:`4`,id:`jwt-yükü`,children:`JWT yükü`}),_jsx(_components.p,{children:`JWT aşağıdaki özelliklere sahip olabilir:`}),_jsx(ParamField,{path:`iss`,required:`true`,id:`param-iss`,children:_jsx(_components.p,{children:`OneSignal Uygulama Kimliğiniz`})}),_jsx(ParamField,{path:`exp`,required:`true`,id:`param-exp`,children:_jsx(_components.p,{children:`Token’ın son kullanma tarihi.`})}),_jsx(ParamField,{path:`identity`,required:`true`,id:`param-identity`,children:_jsx(_components.p,{children:`Kullanıcının takma adı.`})}),_jsx(ParamField,{path:`subscriptions`,id:`param-subscriptions`,children:_jsx(_components.p,{children:`Yalnızca bir kullanıcıya E-posta ve SMS abonelikleri eklerken gereklidir.`})}),_jsx(Heading,{level:`4`,id:`jwt’yi-imzalama`,children:`JWT’yi imzalama`}),_jsxs(_components.p,{children:[`JWT’yi ES256 algoritmasını kullanarak imzalayın. JWT’yi OneSignal’e gönderirken doğrulama sorunlarından kaçınmak için arka ucunuzun bu imzalama yöntemini kullanacak şekilde yapılandırıldığından emin olun. Bunu yapmak için bir `,_jsx(_components.a,{href:`https://jwt.io/libraries`,children:`JWT Kütüphanesi`}),` öneririz.`]}),_jsxs(_components.p,{children:[_jsx(_components.a,{href:`https://www.npmjs.com/package/jsonwebtoken`,children:`jsonwebtoken`}),` kullanan örnek:`]}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`22`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jwt`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'jsonwebtoken'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` APP_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ONESIGNAL_APP_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` IDENTITY_VERIFICATION_SECRET`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'ONESIGNAL_IDENTITY_VERIFICATION_SECRET_KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Generates JWT, potentially with subscription claims, for the user identified by the External ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` signOneSignalJWT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sign`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`iss:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` APP_ID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`exp:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Math`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`floor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`/`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 3600`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1-hour expiration`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`identity:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'external_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`IDENTITY_VERIFICATION_SECRET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`algorithm:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ES256'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// Pass this token to your mobile app to use with the `login` SDK method\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` onesignalJWT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` signOneSignalJWT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'EXTERNAL_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`]})})})}),_jsx(_components.p,{children:`Özel anahtar, Kontrol Panelinden indirdiğimiz önceki adımın dosyasındadır.`}),_jsx(Heading,{level:`4`,id:`jwt’nizi-doğrulayın`,children:`JWT’nizi doğrulayın`}),_jsx(_components.p,{children:`SDK ile entegre etmeden önce, sunucunuzu başlatarak ve uç noktayı çağırarak JWT’nizin doğru oluşturulduğunu doğrulayın:`}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`1`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` node`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`js`})]}),`\n`]})})})}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` http://localhost:3000/generate-jwt/your-external-id`})]}),`\n`]})})})}),_jsx(_components.p,{children:`Aşağıdaki gibi bir yanıt almalısınız:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"jwt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9...\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`JWT değerini `,_jsx(_components.a,{href:`https://jwt.io`,children:`jwt.io`}),` adresine yapıştırın ve kodu çözülmüş yükün aşağıdaki parametreleri içerdiğini onaylayın:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"iss\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-onesignal-app-id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"exp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1234567890`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"identity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-external-id\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(_components.p,{children:`Bir sonraki adıma geçmeden önce aşağıdakileri onaylayın:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`iss`}),` değerinin `,_jsx(_components.strong,{children:`Settings > Keys \u0026 IDs`}),`’deki OneSignal Uygulama Kimliğinizle eşleştiğini`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`identity.external_id`}),` değerinin mevcut olduğunu ve `,_jsx(_components.code,{children:`OneSignal.login()`}),`’e ileteceğiniz değerle eşleştiğini`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`exp`}),` değerinin gelecekteki bir zaman damgası olduğunu — süresi dolmuş bir token OneSignal tarafından reddedilecektir`]}),`\n`]}),_jsx(Heading,{level:`4`,id:`abonelikleri-dahil-etme`,children:`Abonelikleri dahil etme`}),_jsx(_components.p,{children:`İdeal olarak, e-posta veya telefon numarası gibi abonelik ayrıntıları, bir kullanıcıyı oturum açtırırken JWT yüküne dahil edilir. Bu ayrıntılar önceden mevcut değilse, doğrulama sunucunuz abonelik bilgileri kullanılabilir hale geldikçe token’ları dinamik olarak oluşturmak için bir uç nokta sağlamalıdır.`}),_jsx(_components.p,{children:`Örnek: Abonelik eklemek için JWT oluşturma`}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`11`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` subscriptions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Email\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"[email\\xA0protected]\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"SMS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"+12345678\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` onesignalJWT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` signOneSignalJWT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'EXTERNAL_ID'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`subscriptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})})]}),_jsxs(Step,{title:_jsxs(_Fragment,{children:[_jsx(_components.code,{children:`login`}),` yöntemine JWT'yi iletin`]}),children:[_jsxs(_components.p,{children:[`Arka ucunuz JWT’yi oluşturduktan sonra, bununla `,_jsx(_components.code,{children:`login`}),` yöntemini çağırın. Bu token, e-posta veya SMS aboneliği ekleme gibi herhangi bir değişiklik yapılmadan önce kullanıcının kimliğinin doğrulanmasını sağlar.`]}),_jsx(_components.p,{children:`Oturum açma örneği:`}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`java`,numberOfLines:`4`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` externalId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_EXTERNAL_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` onesignalJWT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_JWT_TOKEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`login`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(externalId, onesignalJWT);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`kotlin`,numberOfLines:`4`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` externalId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_EXTERNAL_ID\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_JWT_TOKEN\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`login`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(externalId, onesignalJWT)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Swift`,numberOfLines:`4`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` externalId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_EXTERNAL_ID\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"YOUR_JWT_TOKEN\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`login`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: externalId, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: onesignalJWT)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`objective-c`,numberOfLines:`4`,language:`c`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`c`,children:_jsxs(_components.code,{language:`c`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`NSString`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` externalId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_EXTERNAL_ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`NSString`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_JWT_TOKEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[OneSignal login:externalId withToken:onesignalJWT];`})}),`\n`]})})})]})]}),_jsxs(Step,{title:`Handle JWT lifecycle events`,children:[_jsx(_components.p,{children:`You’ll need to implement a dedicated endpoint on your backend to handle scenarios like token invalidation. This endpoint should provide a refreshed JWT when OneSignal requests an update.`}),_jsx(_components.p,{children:`Example of handling token invalidation and refreshing the JWT:`}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`java`,numberOfLines:`10`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addUserJwtInvalidatedListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(event `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Get the expired user's External ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` externalId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getExternalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Fetch a new JWT from your backend for the user`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` onesignalJWT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"yourUpdatedToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Provide the new JWT to the SDK`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`updateUserJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(externalId, onesignalJWT);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`kotlin`,numberOfLines:`9`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addUserJwtInvalidatedListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` : `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`IUserJwtInvalidatedListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` override`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` fun`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onUserJwtInvalidated`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(event: `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`UserJwtInvalidatedEvent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` externalId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.externalId`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` val`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` updateUserJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(externalId, onesignalJWT)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Swift`,numberOfLines:`21`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` AppDelegate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`UIResponder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`UIApplicationDelegate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`OSUserJwtInvalidatedListener `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` application`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`_`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` application`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: UIApplication, `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`didFinishLaunchingWithOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` launchOptions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [UIApplication.LaunchOptionsKey: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`Any`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`?`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` nil`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` Bool`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Set self to listen for JWT invalidated events`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OneSignal.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`addUserJwtInvalidatedListener`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`self`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Remove the JWT listener as needed by calling:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" // `OneSignal.removeUserJwtInvalidatedListener(self)`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\" // Required to conform to `OSUserJwtInvalidatedListener` protocol\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` func`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` onUserJwtInvalidated`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: OneSignalUser.OSUserJwtInvalidatedEvent) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Get the expired user's External ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` externalId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` event.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`externalId`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Fetch a new JWT from your backend for the user`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"yourUpdatedToken\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Provide the new JWT to the SDK`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OneSignal.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`updateUserJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: externalId, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: onesignalJWT)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`objective-c`,numberOfLines:`18`,language:`c`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`c`,children:_jsxs(_components.code,{language:`c`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@interface MyListener: NSObject`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OSUserJwtInvalidatedListener`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@end`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@implementation MyListener`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`-`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`void`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)onUserJwtInvalidatedWithEvent:(OSUserJwtInvalidatedEvent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` _Nonnull)event {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Get the expired user's External ID`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NSString `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`externalId `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Fetch a new JWT from your backend for the user`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` NSString `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"yourUpdatedToken\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Provide the new JWT to the SDK`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\t[OneSignal updateUserJwt:externalId withToken:onesignalJWT];`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Add or remove your User Jwt Invalidated Listener`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[OneSignal addUserJwtInvalidatedListener:myListener];`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[OneSignal removeUserJwtInvalidatedListener:myListener];`})}),`\n`]})})})]}),_jsx(_components.p,{children:`This ensures that when a user’s JWT is invalidated, a new one can be fetched from your backend and passed to OneSignal. You can also use this function to generate a token with an email and phone number, allowing you to manage email and SMS subscriptions if the token created during authentication does not contain them.`})]}),_jsxs(Step,{title:`Enable token identity verification in the dashboard`,children:[_jsxs(_components.p,{children:[`From `,_jsx(_components.strong,{children:`Settings > Keys \u0026 IDs`}),`, toggle `,_jsx(_components.strong,{children:`Token Identity Verification`}),` to enable.`]}),_jsx(Frame,{caption:`Enabling Token Identity Verification`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=26d06ca0a008e841d5206093bfbf2a8c`,alt:`Token Identity Verification toggle enabled in dashboard settings`,\"data-og-width\":`2350`,width:`2350`,\"data-og-height\":`686`,height:`686`,\"data-path\":`images/docs/4887367-identity_verification_enabled.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?w=280\u0026fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=c4de06719a8828f43acaaaaef12a9dfc 280w, https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?w=560\u0026fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=8cd20820cfee031334a0e64eead8ce04 560w, https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?w=840\u0026fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=3dca5b6c52c8ad05e7288b6a6e8cb84f 840w, https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?w=1100\u0026fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=c7f729ce8add84a2d9fee687db901c5d 1100w, https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?w=1650\u0026fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=c44cddca2927f734599800fa14a272be 1650w, https://mintcdn.com/onesignal/YOTSrtBSoqdrJ37A/images/docs/4887367-identity_verification_enabled.png?w=2500\u0026fit=max\u0026auto=format\u0026n=YOTSrtBSoqdrJ37A\u0026q=85\u0026s=ee3c97bc4d74bd416e8b5ce313373342 2500w`})}),_jsxs(_components.p,{children:[`Etkinleştirildikten sonra, uygulamanızın abonelik özgünlüğünü doğrulamak için OneSignal JWT’lerini göndermesi gerekir. Ek olarak, uygulamanızın kimlik doğrulama token sunucunuz tarafından oluşturulan bir JWT kullanarak `,_jsx(_components.code,{children:`login`}),` yöntemini çağırması gerekir.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`abonelik-ekleme`,children:`Abonelik ekleme`}),`\n`,_jsx(_components.p,{children:`Mobil uygulamanızdan abonelik eklemek için ekstra adımlar atmanıza gerek yoktur; login yöntemini çağırmak bunu sizin için otomatik olarak halleder.`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`E-posta ekleyin`,id:`e-posta-ekleyin`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`java`,numberOfLines:`1`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEmail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(emailAddress);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`kotlin`,numberOfLines:`1`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addEmail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(emailAddress)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Swift`,numberOfLines:`6`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If you have not already included it in your JWT token, update the JWT with the email`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"newTokenThatContainsTheEmailToAdd\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`updateUserJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: externalId, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: onesignalJWT)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Add the email`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`User`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`addEmail`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(emailAddress)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`objective-c`,numberOfLines:`6`,language:`c`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`c`,children:_jsxs(_components.code,{language:`c`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If you have not already included it in your JWT token, update the JWT with the email`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`NSString `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"newTokenThatContainsTheEmailToAdd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[OneSignal updateUserJwt:externalId withToken:onesignalJWT];`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Add the email`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`User`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` addEmail:emailAddress];`})]}),`\n`]})})})]})}),_jsx(Tab,{title:`Telefon numarası ekleyin`,id:`telefon-numaras%C4%B1-ekleyin`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`java`,numberOfLines:`1`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addSms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(smsNumber);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`kotlin`,numberOfLines:`1`,language:`kotlin`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`kotlin`,children:_jsxs(_components.code,{language:`kotlin`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getUser`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`addSms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(smsNumber)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Swift`,numberOfLines:`6`,language:`swift`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`swift`,children:_jsxs(_components.code,{language:`swift`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If you have not already included it in your JWT token, update the JWT with the sms`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"newTokenThatContainsTheSmsToAdd\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`updateUserJwt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`externalId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: externalId, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: onesignalJWT)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Add the sms number`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`OneSignal.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`User`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`addSms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(smsNumber)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`objective-c`,numberOfLines:`6`,language:`c`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`c`,children:_jsxs(_components.code,{language:`c`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If you have not already included it in your JWT token, update the JWT with the sms`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`NSString `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`onesignalJWT `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"newTokenThatContainsTheSmsToAdd\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[OneSignal updateUserJwt:externalId withToken:onesignalJWT];`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Add the sms number`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OneSignal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`User`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` addSms:smsNumber];`})]}),`\n`]})})})]})})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`rest-api`,children:`REST API`}),`\n`,_jsxs(_components.p,{children:[`Token Kimlik Doğrulama etkinleştirildiğinde, aşağıdaki API’lere yapılan tüm istekler başlıklarda bir bearer token olarak sunucu tarafından oluşturulan bir JWT içermelidir, örneğin, `,_jsx(_components.code,{children:`Authorization: Bearer \u003cJWT>`}),`.`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/create-user`,children:`Create user`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/view-user`,children:`View user`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/update-user`,children:`Update user`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/delete-user`,children:`Delete user`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/fetch-aliases`,children:`View user identity`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/create-alias`,children:`Create alias`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/delete-alias`,children:`Delete alias`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/create-subscription`,children:`Create subscription`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/update-subscription`,children:`Update subscription`})}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`sss`,children:`SSS`}),`\n`,_jsx(Heading,{level:`3`,id:`kimlik-doğrulama-gerekli-midir`,children:`Kimlik doğrulama gerekli midir?`}),`\n`,_jsx(_components.p,{children:`Hayır, ancak şiddetle tavsiye edilir. Olmadan, bir kullanıcının Harici Kimliğini bilen herhangi bir istemci o kullanıcının kimliğine bürünebilir ve aboneliklerini veya verilerini değiştirebilir.`}),`\n`,_jsx(Heading,{level:`3`,id:`oturum-sırasında-jwt-süresi-dolarsa-ne-olur`,children:`Oturum sırasında JWT süresi dolarsa ne olur?`}),`\n`,_jsxs(_components.p,{children:[`SDK bir JWT geçersizleştirme olayı tetikler. Arka ucunuzdan yenilenmiş bir token almak ve `,_jsx(_components.code,{children:`updateUserJwt`}),`’ye iletmek için `,_jsx(_components.code,{children:`addUserJwtInvalidatedListener`}),`’ı uygulayın (`,_jsx(_components.a,{href:`#handle-jwt-lifecycle-events`,children:`JWT yaşam döngüsü olaylarını işleme`}),` bölümüne bakın).`]}),`\n`,_jsx(Heading,{level:`3`,id:`hangi-sdk’lar-kimlik-doğrulamayı-destekler`,children:`Hangi SDK’lar kimlik doğrulamayı destekler?`}),`\n`,_jsx(_components.p,{children:`Şu anda yerel Android SDK (5.2.0+) ve iOS SDK (5.3.0+). Wrapper SDK desteği (Flutter, React Native, Unity, vb.) yakında geliyor.`}),`\n`,_jsx(Heading,{level:`3`,id:`rest-api-için-kimlik-doğrulama-gerekli-midir`,children:`REST API için kimlik doğrulama gerekli midir?`}),`\n`,_jsxs(_components.p,{children:[`Token Kimlik Doğrulama etkinleştirildiğinde, `,_jsx(_components.a,{href:`#rest-api`,children:`desteklenen API’lere`}),` yapılan tüm istekler `,_jsx(_components.code,{children:`Authorization`}),` başlığında bearer token olarak sunucu tarafından oluşturulan bir JWT içermelidir. JWT, SDK kullanımıyla aynı şekilde oluşturulur.`]}),`\n`,_jsx(Heading,{level:`3`,id:`jwt-hangi-algoritmayı-kullanır`,children:`JWT hangi algoritmayı kullanır?`}),`\n`,_jsxs(_components.p,{children:[`Kimlik Doğrulama, `,_jsx(_components.strong,{children:`ES256`}),` algoritmasıyla (P-256 ve SHA-256 kullanan ECDSA) imzalanmış JWT’ler gerektirir. Diğer algoritmalar reddedilecektir.`]}),`\n`,_jsx(_components.hr,{})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Kimlik doğrulama","description":"OneSignal'e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT'ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.","keywords":["identity verification","JWT","external user id","user impersonation","login security","authentication","ES256"],"href":"/docs/tr/identity-verification"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Genel Bakış","slug":"genel-bakış","depth":2,"children":[]},{"title":"Önkoşullar","slug":"önkoşullar","depth":2,"children":[]},{"title":"Kurulum","slug":"kurulum","depth":2,"children":[{"title":"JWT yükü","slug":"jwt-yükü","depth":4,"children":[]},{"title":"JWT’yi imzalama","slug":"jwt’yi-imzalama","depth":4,"children":[]},{"title":"JWT’nizi doğrulayın","slug":"jwt’nizi-doğrulayın","depth":4,"children":[]},{"title":"Abonelikleri dahil etme","slug":"abonelikleri-dahil-etme","depth":4,"children":[]}]},{"title":"Abonelik ekleme","slug":"abonelik-ekleme","depth":2,"children":[]},{"title":"REST API","slug":"rest-api","depth":2,"children":[]},{"title":"SSS","slug":"sss","depth":2,"children":[{"title":"Kimlik doğrulama gerekli midir?","slug":"kimlik-doğrulama-gerekli-midir","depth":3,"children":[]},{"title":"Oturum sırasında JWT süresi dolarsa ne olur?","slug":"oturum-sırasında-jwt-süresi-dolarsa-ne-olur","depth":3,"children":[]},{"title":"Hangi SDK’lar kimlik doğrulamayı destekler?","slug":"hangi-sdk’lar-kimlik-doğrulamayı-destekler","depth":3,"children":[]},{"title":"REST API için kimlik doğrulama gerekli midir?","slug":"rest-api-için-kimlik-doğrulama-gerekli-midir","depth":3,"children":[]},{"title":"JWT hangi algoritmayı kullanır?","slug":"jwt-hangi-algoritmayı-kullanır","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/onesignal/e069c1b9f3157e14/hotjar-koala.js","/_mintlify/custom/onesignal/3e5d03885ab32f49/intercom.js","/_mintlify/custom/onesignal/dbb7af4794d1b586/munchkin-marketo.js"],"subdomain":"onesignal","siteName":"OneSignal Documentation","title":"Kimlik doğrulama - OneSignal Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/docs/en/identity-verification","matchLevel":1},"cn":{"href":"/docs/cn/identity-verification","matchLevel":1},"ko":{"href":"/docs/ko/identity-verification","matchLevel":1},"ja":{"href":"/docs/ja/identity-verification","matchLevel":1},"tr":{"href":"/docs/tr/identity-verification","matchLevel":0},"pt-BR":{"href":"/docs/pt-BR/identity-verification","matchLevel":1},"es":{"href":"/docs/es/identity-verification","matchLevel":1},"fr":{"href":"/docs/fr/identity-verification","matchLevel":1}}},"lastModified":"2026-09-17T22:03:51.010Z","originalFileLocation":"docs/tr/identity-verification.mdx","locale":"tr"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"OneSignal\u0026#x27;e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT\u0026#x27;ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OneSignal Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Kimlik doğrulama - OneSignal Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"OneSignal\u0026#x27;e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT\u0026#x27;ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OneSignal Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://documentation.onesignal.com/docs/tr/identity-verification\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://onesignal.mintlify.site/_mintlify/api/og/v2?division=Geli%C5%9Ftirici+Belgeleri\u0026amp;title=Kimlik+do%C4%9Frulama\u0026amp;description=OneSignal%27e+g%C3%B6nderilen+Harici+Kullan%C4%B1c%C4%B1+Kimliklerini%2C+e-posta+ve+SMS+aboneliklerini+do%C4%9Frulamak+i%C3%A7in+sunucu+taraf%C4%B1ndan+olu%C5%9Fturulan+JWT%27ler+gerektirerek+kullan%C4%B1c%C4%B1\u0026amp;theme=12e705baa88dc8cc6d7a9877\u0026amp;signature=9d387106d9522f7c9b813a4da2d9f97ee4fa52935b33e7555fa1bfbf64f03fd8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Kimlik doğrulama - OneSignal Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"OneSignal\u0026#x27;e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT\u0026#x27;ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://onesignal.mintlify.site/_mintlify/api/og/v2?division=Geli%C5%9Ftirici+Belgeleri\u0026amp;title=Kimlik+do%C4%9Frulama\u0026amp;description=OneSignal%27e+g%C3%B6nderilen+Harici+Kullan%C4%B1c%C4%B1+Kimliklerini%2C+e-posta+ve+SMS+aboneliklerini+do%C4%9Frulamak+i%C3%A7in+sunucu+taraf%C4%B1ndan+olu%C5%9Fturulan+JWT%27ler+gerektirerek+kullan%C4%B1c%C4%B1\u0026amp;theme=12e705baa88dc8cc6d7a9877\u0026amp;signature=9d387106d9522f7c9b813a4da2d9f97ee4fa52935b33e7555fa1bfbf64f03fd8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/onesignal/eCiRydtW5fLfLRWp/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OneSignal Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3A3DB3\">\u003clink data-mint-head rel=\"canonical\" href=\"https://documentation.onesignal.com/docs/tr/identity-verification\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/tr/identity-verification.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"tr\" href=\"https://documentation.onesignal.com/docs/tr/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://documentation.onesignal.com/docs/en/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://documentation.onesignal.com/docs/cn/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://documentation.onesignal.com/docs/ko/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://documentation.onesignal.com/docs/ja/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://documentation.onesignal.com/docs/pt-BR/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://documentation.onesignal.com/docs/es/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://documentation.onesignal.com/docs/fr/identity-verification\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://documentation.onesignal.com/docs/en/identity-verification\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://documentation.onesignal.com/#organization\",\"name\":\"OneSignal Documentation\",\"url\":\"https://documentation.onesignal.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/onesignal/yJcueeDCO7UpHnnY/logo/OneSignal-Logo.svg?fit=max\u0026auto=format\u0026n=yJcueeDCO7UpHnnY\u0026q=85\u0026s=1fcfb6fef6d820fd9d99c74850711107\"}},{\"@type\":\"WebSite\",\"@id\":\"https://documentation.onesignal.com#website\",\"name\":\"OneSignal Documentation\",\"url\":\"https://documentation.onesignal.com\",\"publisher\":{\"@id\":\"https://documentation.onesignal.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://documentation.onesignal.com/docs/tr/identity-verification#webpage\",\"url\":\"https://documentation.onesignal.com/docs/tr/identity-verification\",\"name\":\"Kimlik doğrulama\",\"description\":\"OneSignal'e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT'ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.\",\"dateModified\":\"2026-09-17T22:03:51.010Z\",\"isPartOf\":{\"@id\":\"https://documentation.onesignal.com#website\"},\"breadcrumb\":{\"@id\":\"https://documentation.onesignal.com/docs/tr/identity-verification#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://documentation.onesignal.com/docs/tr/identity-verification#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Geliştirici Belgeleri\",\"item\":\"https://documentation.onesignal.com/docs/tr/developers\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kimlik doğrulama\",\"item\":\"https://documentation.onesignal.com/docs/tr/identity-verification\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://documentation.onesignal.com/docs/tr/identity-verification#article\",\"headline\":\"Kimlik doğrulama\",\"name\":\"Kimlik doğrulama\",\"description\":\"OneSignal'e gönderilen Harici Kullanıcı Kimliklerini, e-posta ve SMS aboneliklerini doğrulamak için sunucu tarafından oluşturulan JWT'ler gerektirerek kullanıcı kimliğine bürünmeyi önleyin.\",\"url\":\"https://documentation.onesignal.com/docs/tr/identity-verification\",\"mainEntityOfPage\":{\"@id\":\"https://documentation.onesignal.com/docs/tr/identity-verification#webpage\"},\"dateModified\":\"2026-09-17T22:03:51.010Z\",\"keywords\":\"identity verification, JWT, external user id, user impersonation, login security, authentication, ES256\",\"publisher\":{\"@id\":\"https://documentation.onesignal.com/#organization\"},\"isPartOf\":{\"@id\":\"https://documentation.onesignal.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OneSignal Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"OneSignal Documentation","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/docs/en/identity-verification"}]},{"language":"cn","pages":[{"title":"cn","href":"/docs/cn/identity-verification"}]},{"language":"ko","pages":[{"title":"ko","href":"/docs/ko/identity-verification"}]},{"language":"ja","pages":[{"title":"ja","href":"/docs/ja/identity-verification"}]},{"language":"tr","tabs":[{"tab":"Ana Sayfa","pages":[{"title":"Ana Sayfa","href":"/docs/tr/home"}]},{"tab":"Kullanıcı Kılavuzları","pages":[{"title":"Kullanıcı Kılavuzları","href":"/docs/tr/quickstart-guide"}]},{"tab":"Geliştirici Kılavuzları","groups":[{"group":"Geliştirici Belgeleri","pages":[{"title":"Geliştiriciler","description":"OneSignal Mobil ve Web SDK'larını kurun, App ID ve API anahtarlarınızı bulun, Kullanıcıları tanımlayın ve yayına geçmeden önce entegrasyonunuzu test edin.","href":"/docs/tr/developers"},{"title":"Kimlik doğrulama","href":"/docs/tr/identity-verification"},{"group":"Kullanıcı modeli","pages":[{"title":"Kullanıcı modeli ve geçiş kılavuzu","description":"OneSignal'in cihaz merkezli modelinden daha kişiselleştirilmiş, çok kanallı etkileşim için yeni kullanıcı merkezli API'lere ve SDK'lara nasıl geçeceğinizi öğrenin.","href":"/docs/tr/user-model-migration-guide"},{"title":"Mobil SDK Eşlemesi","href":"/docs/tr/device-user-model-mobile-sdk-mapping"},{"title":"Web SDK Eşleştirmesi","href":"/docs/tr/device-user-model-web-sdk-mapping"}]}]},{"group":"Mobil SDK'lar","pages":[{"group":"Mobil SDK kurulumu","pages":[{"title":"Mobil SDK kurulumu","href":"/docs/tr/mobile-sdk-setup"},{"group":"Platform kimlik bilgileri kurulumu","pages":[{"title":"Android Firebase kimlik bilgileri","href":"/docs/tr/android-firebase-credentials"},{"title":"iOS p8 token tabanlı APNs bağlantısı","href":"/docs/tr/ios-p8-token-based-connection-to-apns"},{"title":"iOS p12 sertifika oluşturma","href":"/docs/tr/ios-p12-generate-certificates"},{"title":"Amazon API anahtarı oluşturma","href":"/docs/tr/generate-an-amazon-api-key"},{"title":"Huawei yetkilendirmesi","href":"/docs/tr/authorize-onesignal-to-send-huawei-push"}]},{"title":"iOS SDK kurulumu","href":"/docs/tr/ios-sdk-setup"},{"title":"Android SDK kurulumu","href":"/docs/tr/android-sdk-setup"},{"title":"Unity SDK kurulumu","href":"/docs/tr/unity-sdk-setup"},{"title":"React Native SDK kurulumu","href":"/docs/tr/react-native-sdk-setup"},{"title":"Expo SDK kurulumu","href":"/docs/tr/react-native-expo-sdk-setup"},{"title":"Flutter SDK kurulumu","href":"/docs/tr/flutter-sdk-setup"},{"title":"Flutterflow SDK kurulumu","href":"/docs/tr/flutterflow-sdk-setup"},{"title":"Cordova SDK kurulumu","href":"/docs/tr/cordova-sdk-setup"},{"title":"Capacitor SDK kurulumu","href":"/docs/tr/capacitor-sdk-setup"},{"title":".NET MAUI SDK kurulumu","href":"/docs/tr/net-sdk-setup"},{"title":"Amazon SDK kurulumu","href":"/docs/tr/amazon-sdk-setup"},{"title":"Huawei SDK kurulumu","href":"/docs/tr/huawei-sdk-setup"}]},{"group":"Mobil SDK referansı","pages":[{"title":"Mobil SDK referansı","href":"/docs/tr/mobile-sdk-reference"},{"title":"Mobil Servis Eklentileri","href":"/docs/tr/service-extensions"},{"title":"Bildirim tepsisini yönetme","href":"/docs/tr/managing-the-notification-tray"},{"title":"OSNotification payload","href":"/docs/tr/osnotification-payload"},{"title":"iOS: App Clip Desteği","href":"/docs/tr/app-clip-support"}]},{"group":"Mobil SDK hata ayıklama","pages":[{"title":"Mobil SDK sorun giderme","href":"/docs/tr/mobile-troubleshooting"},{"title":"Hata Ayıklama Günlüğü Alma","href":"/docs/tr/capturing-a-debug-log"}]}]},{"group":"Web SDK'lar","pages":[{"group":"Web SDK kurulumu","pages":[{"title":"Web SDK kurulumu","href":"/docs/tr/web-sdk-setup"},{"title":"iOS web push kurulumu","href":"/docs/tr/web-push-for-ios"},{"title":"OneSignal service worker","href":"/docs/tr/onesignal-service-worker"},{"title":"OneSignal Web SDK ile özel kod web push kurulumu","href":"/docs/tr/web-push-custom-code-setup"},{"title":"Google Tag Manager kurulumu","href":"/docs/tr/google-tag-manager"},{"title":"Angular Web SDK kurulumu","href":"/docs/tr/angular-setup"},{"title":"ReactJS ve NextJS Kurulumu","href":"/docs/tr/react-js-setup"},{"title":"Vue JS Web SDK kurulumu","href":"/docs/tr/vue-js-setup"}]},{"title":"Web SDK referansı","href":"/docs/tr/web-sdk-reference"},{"group":"Web SDK hata ayıklama","pages":[{"title":"Web SDK sorun giderme","href":"/docs/tr/troubleshooting-web-push"},{"title":"Önbelleği temizleme ve push izinlerini sıfırlama","href":"/docs/tr/clearing-cache-and-resetting-push-permissions"},{"title":"Web push webhook'ları","href":"/docs/tr/webhooks"}]}]},{"group":"Canlı Etkinlikler","pages":[{"title":"Live Activities geliştirici kurulumu","href":"/docs/tr/live-activities-developer-setup"},{"title":"Platformlar arası Live Activity SDK kurulumu","href":"/docs/tr/cross-platform-live-activity-setup"},{"title":"Android Live Update bildirimleri","href":"/docs/tr/android-live-notifications"}]},{"group":"Masaüstü \u0026 Watch Kurulumu","pages":[{"title":"macOS uygulama kurulumu","href":"/docs/tr/macos-app-setup"},{"title":"Windows uygulama kurulumu","href":"/docs/tr/windows-app-setup"},{"title":"watchOS ve Wear OS Desteği","href":"/docs/tr/watchos-and-wear-os-support"}]}]},{"tab":"Eğitimler","pages":[{"title":"Eğitimler","href":"/docs/tr/tutorials"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/reference/rest-api-overview"}]},{"tab":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes/changelog"}]}],"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://onesignal.com/blog"},{"anchor":"GitHub","icon":"github","href":"https://github.com/OneSignal"},{"anchor":"YouTube","icon":"youtube","href":"https://www.youtube.com/@onesignalofficial/playlists"}]}},{"language":"pt-BR","pages":[{"title":"pt-BR","href":"/docs/pt-BR/identity-verification"}]},{"language":"es","pages":[{"title":"es","href":"/docs/es/identity-verification"}]},{"language":"fr","pages":[{"title":"fr","href":"/docs/fr/identity-verification"}]}]},"basePath":"","title":"Kimlik doğrulama - OneSignal Documentation","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-5Xwp92K7.js","DynamicMarkdown-BoyYAA8K.js","zoom-image-lightbox-DkE6VzSN.js","lightbox-handle-r17bVUz3.js"]}