{"action":"created","issue":{"url":"https://api.github.com/repos/mCodex/react-native-sensitive-info/issues/125","repository_url":"https://api.github.com/repos/mCodex/react-native-sensitive-info","labels_url":"https://api.github.com/repos/mCodex/react-native-sensitive-info/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/mCodex/react-native-sensitive-info/issues/125/comments","events_url":"https://api.github.com/repos/mCodex/react-native-sensitive-info/issues/125/events","html_url":"https://github.com/mCodex/react-native-sensitive-info/issues/125","id":368932488,"node_id":"MDU6SXNzdWUzNjg5MzI0ODg=","number":125,"title":"Delete sensitive info when app is reinstalled","user":{"login":"gavin-gmlab","id":20513400,"node_id":"MDQ6VXNlcjIwNTEzNDAw","avatar_url":"https://avatars0.githubusercontent.com/u/20513400?v=4","gravatar_id":"","url":"https://api.github.com/users/gavin-gmlab","html_url":"https://github.com/gavin-gmlab","followers_url":"https://api.github.com/users/gavin-gmlab/followers","following_url":"https://api.github.com/users/gavin-gmlab/following{/other_user}","gists_url":"https://api.github.com/users/gavin-gmlab/gists{/gist_id}","starred_url":"https://api.github.com/users/gavin-gmlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavin-gmlab/subscriptions","organizations_url":"https://api.github.com/users/gavin-gmlab/orgs","repos_url":"https://api.github.com/users/gavin-gmlab/repos","events_url":"https://api.github.com/users/gavin-gmlab/events{/privacy}","received_events_url":"https://api.github.com/users/gavin-gmlab/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-11T02:59:20Z","updated_at":"2018-10-22T21:05:43Z","closed_at":null,"author_association":"NONE","body":"I currently use Sensitive Info to save the login tokens etc. I now have a problem where if a user uninstalls the app without logging out, then reinstalls the app on the same phone, the app crashes because it still thinks its logged in.\r\n\r\nHow can I make sure to delete any relevant information in keychain upon 1st Install? Can this be included in the base library?\r\n\r\nI found a workaround on StackOverflow which suggested putting this native code in \r\n`- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions`\r\n\r\nBasically\r\n```\r\n    //Clear keychain on first run in case of reinstallation\r\n  if (![[NSUserDefaults standardUserDefaults] objectForKey:@\"FirstRun\"]) {\r\n      // Delete values from keychain here\r\n      [[NSUserDefaults standardUserDefaults] setValue:@\"1strun\" forKey:@\"FirstRun\"];\r\n      [[NSUserDefaults standardUserDefaults] synchronize];\r\n  }\r\n```\r\nI need to insert code in the //Delete values from keychain section, but am not sure how to go about doing this."},"comment":{"url":"https://api.github.com/repos/mCodex/react-native-sensitive-info/issues/comments/431986113","html_url":"https://github.com/mCodex/react-native-sensitive-info/issues/125#issuecomment-431986113","issue_url":"https://api.github.com/repos/mCodex/react-native-sensitive-info/issues/125","id":431986113,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTk4NjExMw==","user":{"login":"jkdf2","id":2641739,"node_id":"MDQ6VXNlcjI2NDE3Mzk=","avatar_url":"https://avatars2.githubusercontent.com/u/2641739?v=4","gravatar_id":"","url":"https://api.github.com/users/jkdf2","html_url":"https://github.com/jkdf2","followers_url":"https://api.github.com/users/jkdf2/followers","following_url":"https://api.github.com/users/jkdf2/following{/other_user}","gists_url":"https://api.github.com/users/jkdf2/gists{/gist_id}","starred_url":"https://api.github.com/users/jkdf2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkdf2/subscriptions","organizations_url":"https://api.github.com/users/jkdf2/orgs","repos_url":"https://api.github.com/users/jkdf2/repos","events_url":"https://api.github.com/users/jkdf2/events{/privacy}","received_events_url":"https://api.github.com/users/jkdf2/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T21:05:43Z","updated_at":"2018-10-22T21:05:43Z","author_association":"NONE","body":"You may find the response from eskimo useful here: https://forums.developer.apple.com/thread/36442"}}
{"actor":{"display_login":"jkdf2"}}