{"action":"created","issue":{"url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/issues/147","repository_url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth","labels_url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/issues/147/comments","events_url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/issues/147/events","html_url":"https://github.com/FormidableLabs/react-native-app-auth/pull/147","id":341878207,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxOTA5MzE0","number":147,"title":"Android/Feature: Add method to prefetch once, reuse AutherizationServiceConfig","user":{"login":"creambyemute","id":3519121,"node_id":"MDQ6VXNlcjM1MTkxMjE=","avatar_url":"https://avatars1.githubusercontent.com/u/3519121?v=4","gravatar_id":"","url":"https://api.github.com/users/creambyemute","html_url":"https://github.com/creambyemute","followers_url":"https://api.github.com/users/creambyemute/followers","following_url":"https://api.github.com/users/creambyemute/following{/other_user}","gists_url":"https://api.github.com/users/creambyemute/gists{/gist_id}","starred_url":"https://api.github.com/users/creambyemute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/creambyemute/subscriptions","organizations_url":"https://api.github.com/users/creambyemute/orgs","repos_url":"https://api.github.com/users/creambyemute/repos","events_url":"https://api.github.com/users/creambyemute/events{/privacy}","received_events_url":"https://api.github.com/users/creambyemute/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-17T11:26:55Z","updated_at":"2018-07-21T18:57:49Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/pulls/147","html_url":"https://github.com/FormidableLabs/react-native-app-auth/pull/147","diff_url":"https://github.com/FormidableLabs/react-native-app-auth/pull/147.diff","patch_url":"https://github.com/FormidableLabs/react-native-app-auth/pull/147.patch"},"body":"Hey there, please have a look at this.\r\n\r\nWhat it does:\r\nAdding a method to prefetch once and reuse the AuthorizationServiceConfig with discovery mode.\r\nIt takes at least 50% less time to start up the Chrome Custom Tab on Android in Emulator if you call this in componentDidMount.\r\nOn device it's almost instant with this addition.\r\n\r\nUsage in JS:\r\n`import { prefetchOnce } from \"react-native-app-auth\";`\r\n\r\n`componentDidMount() {\r\n        prefetchOnce(authConfig);\r\n}`\r\n\r\nEdit: Refactored the original PR\r\nEdit2: I also have a branch which adapts the example to use prefetchOnce\r\nEdit3: Had a look at iOS, I think we don't have to do anything there. The SFSafariViewController opens instantly no matter if it has to discover or not"},"comment":{"url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/issues/comments/406816671","html_url":"https://github.com/FormidableLabs/react-native-app-auth/pull/147#issuecomment-406816671","issue_url":"https://api.github.com/repos/FormidableLabs/react-native-app-auth/issues/147","id":406816671,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjgxNjY3MQ==","user":{"login":"kadikraman","id":6534400,"node_id":"MDQ6VXNlcjY1MzQ0MDA=","avatar_url":"https://avatars0.githubusercontent.com/u/6534400?v=4","gravatar_id":"","url":"https://api.github.com/users/kadikraman","html_url":"https://github.com/kadikraman","followers_url":"https://api.github.com/users/kadikraman/followers","following_url":"https://api.github.com/users/kadikraman/following{/other_user}","gists_url":"https://api.github.com/users/kadikraman/gists{/gist_id}","starred_url":"https://api.github.com/users/kadikraman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadikraman/subscriptions","organizations_url":"https://api.github.com/users/kadikraman/orgs","repos_url":"https://api.github.com/users/kadikraman/repos","events_url":"https://api.github.com/users/kadikraman/events{/privacy}","received_events_url":"https://api.github.com/users/kadikraman/received_events","type":"User","site_admin":false},"created_at":"2018-07-21T18:57:49Z","updated_at":"2018-07-21T18:57:49Z","author_association":"MEMBER","body":"Thanks for the PR 🙏 \r\n\r\nSeems to work fine for me, and it does significantly speed up the Chrome Custom Tab, I think it's a really good idea.\r\n\r\nThe method name could be a bit clearer, how about `prefetchConfiguration`? Just to make it a bit more obvious what it's doing.\r\n\r\nAlso would you be able to update the readme?\r\n"}}
{"actor":{"display_login":"kadikraman"}}