@@ -60,7 +60,7 @@ function osmOAuth2Client(client_id, client_secret) {
6060 * NOT a webview inside MapSwipe, as this would break the promise of
6161 * OAuth that we do not touch their OSM credentials
6262 */
63- function redirect2OsmOauth ( redirect_uri , client_id , client_secret ) {
63+ function redirect2OsmOauth ( req , res , redirect_uri , client_id , client_secret ) {
6464 const oauth2 = osmOAuth2Client ( client_id , client_secret ) ;
6565
6666 cookieParser ( ) ( req , res , ( ) => {
@@ -90,14 +90,14 @@ export const redirect = (req: any, res: any) => {
9090 const redirect_uri = OAUTH_REDIRECT_URI ;
9191 const client_id = functions . config ( ) . osm ?. client_id ;
9292 const client_secret = functions . config ( ) . osm ?. client_secret ;
93- redirect2OsmOauth ( redirect_uri , client_id , client_secret ) ;
93+ redirect2OsmOauth ( req , res , redirect_uri , client_id , client_secret ) ;
9494} ;
9595
9696export const redirectweb = ( req : any , res : any ) => {
9797 const redirect_uri = OAUTH_REDIRECT_URI_WEB ;
9898 const client_id = functions . config ( ) . osm ?. client_id_web ;
9999 const client_secret = functions . config ( ) . osm ?. client_secret_web ;
100- redirect2OsmOauth ( redirect_uri , client_id , client_secret ) ;
100+ redirect2OsmOauth ( req , res , redirect_uri , client_id , client_secret ) ;
101101} ;
102102
103103/**
@@ -123,7 +123,7 @@ async function getOSMProfile(accessToken: string) {
123123 * The Firebase custom auth token, display name, photo URL and OSM access
124124 * token are sent back to the app via a deeplink redirect.
125125 */
126- function fbToken ( redirect_uri , osm_login_link , client_id , client_web ) {
126+ function fbToken ( req , res , admin , redirect_uri , osm_login_link , client_id , client_web ) {
127127 const oauth2 = osmOAuth2Client ( client_id , client_web ) ;
128128
129129 try {
@@ -211,15 +211,15 @@ export const token = async (req: any, res: any, admin: any) => {
211211 const osm_login_link = APP_OSM_LOGIN_DEEPLINK ;
212212 const client_id = functions . config ( ) . osm ?. client_id ;
213213 const client_secret = functions . config ( ) . osm ?. client_secret ;
214- fbToken ( redirect_uri , osm_login_link , client_id , client_secret ) ;
214+ fbToken ( req , res , admin , redirect_uri , osm_login_link , client_id , client_secret ) ;
215215} ;
216216
217217export const tokenweb = async ( req : any , res : any , admin : any ) => {
218218 const redirect_uri = OAUTH_REDIRECT_URI_WEB ;
219219 const osm_login_link = APP_OSM_LOGIN_DEEPLINK_WEB ;
220220 const client_id = functions . config ( ) . osm ?. client_id_web ;
221221 const client_secret = functions . config ( ) . osm ?. client_secret_web ;
222- fbToken ( redirect_uri , osm_login_link , client_id , client_secret ) ;
222+ fbToken ( req , res , admin , redirect_uri , osm_login_link , client_id , client_secret ) ;
223223} ;
224224
225225/**
0 commit comments