| 77 | } |
| 78 | |
| 79 | export class TwitterProvider extends ProviderBase { |
| 80 | _builder: com.firebase.ui.auth.AuthUI.IdpConfig.TwitterBuilder; |
| 81 | constructor() { |
| 82 | super(); |
| 83 | this._builder = new com.firebase.ui.auth.AuthUI.IdpConfig.TwitterBuilder(); |
| 84 | } |
| 85 | |
| 86 | _scopes: string[] = []; |
| 87 | get scopes() { |
| 88 | return this._scopes; |
| 89 | } |
| 90 | |
| 91 | set scopes(values: string[]) { |
| 92 | if (Array.isArray(values)) { |
| 93 | this._scopes = values; |
| 94 | const scopes = new java.util.ArrayList<string>(); |
| 95 | this._scopes.forEach((scope) => { |
| 96 | scopes.add(scope); |
| 97 | }); |
| 98 | this._builder.setScopes(scopes); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | setCustomParameters(params: Record<string, string>) { |
| 103 | if (typeof params === 'object') { |
| 104 | const parameters = new java.util.HashMap<string, string>(); |
| 105 | Object.keys(params).forEach((key) => { |
| 106 | const value = params[key]; |
| 107 | parameters.put(key, value); |
| 108 | }); |
| 109 | this._builder.setCustomParameters(parameters); |
| 110 | } |
| 111 | return this; |
| 112 | } |
| 113 | |
| 114 | getNative(ui: IUI) { |
| 115 | return this._builder.build(); |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | export class GithubProvider extends ProviderBase { |
| 120 | _builder: com.firebase.ui.auth.AuthUI.IdpConfig.GitHubBuilder; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…