@@ -125,34 +125,18 @@ async function storeRp(
125125 return rp
126126}
127127
128- function registerRp ( idp : string , opts : loginOptions ) : Promise < RelyingParty > {
129- const { storage , callbackUri } = opts
128+ function registerRp (
129+ idp : string ,
130+ { storage, callbackUri } : loginOptions
131+ ) : Promise < RelyingParty > {
130132 const responseType = 'id_token token'
131-
132- const clientNameI18n = { }
133- Object.entries(opts)
134- .filter(([key, _]) => key . startsWith ( 'clientName#' ) )
135- . forEach (
136- ( [ key , value ] ) =>
137- ( clientNameI18n [ key . replace ( 'clientName#' , 'client_name#' ) ] = value )
138- )
139-
140- const supplementaryOptions = {
141- logo_uri : opts . logoUri ,
142- contacts : opts . contacts ,
143- client_name : opts . clientName
144- }
145-
146133 const registration = {
147134 issuer : idp ,
148135 grant_types : [ 'implicit' ] ,
149136 redirect_uris : [ callbackUri ] ,
150137 response_types : [ responseType ] ,
151- scope : 'openid profile' ,
152- ...clientNameI18n ,
153- ...supplementaryOptions
138+ scope : 'openid profile'
154139 }
155-
156140 const options = {
157141 defaults : {
158142 authenticate : {
@@ -162,7 +146,6 @@ function registerRp(idp: string, opts: loginOptions): Promise<RelyingParty> {
162146 } ,
163147 store : storage
164148 }
165-
166149 return RelyingParty . register ( idp , registration , options )
167150}
168151
0 commit comments