I have a custom action URL for password reset in my firebase project.
Here, I'm using the dev mode URL: http://localhost:3000/auth/reset-password
Now if I want to deploy the app, it looks as if I will have to change the URL back to my custom domain name like www.mydomain.com/auth/reset-password.
Will I have to do this every time, or is there any work around?
What I really did was that I used nextjs to check if I was in production or development, and based on that, I navigate my users. On the firebase dashboard, I didn't do anything.
I used the ResetPassword function and set the property of the actionUrl based on the above condition.
Related
I have 2 frontend interfaces for my firebase project (both housed in the same firebase app in the backend). One is web and one is for iOS.
I'm trying to create passwordless sign-in functionality for the iOS app and have gone through all setup guides regarding setting up dynamic links, custom domains etc.
I have gotten to the point where both the web and iOS apps can both send the email successfully, however the root domain changes between the emails sent from each platform. An example is below:
Web App: Sends login email via firebase.auth().sendSignInLinkToEmail and the resulting root domain in the email is https://app.domainname.com (this is correct and is what is set up as a whitelisted domain/dynamic link domain in firebase)
iOS App: Using the same function, the resulting root domain is https://domainname.com (incorrect). This results in the link going to the non-firebase, generic website and breaking the flow.
If I add the app subdomain back to the link generated by the iOS email, the dynamic link does then work, so the issue seems to be isolated to this root domain change specifically.
Upon further investigation, the issue seems to be related to the action code settings.
When the iOS.bundleId property is set, or handleCodeInApp is true, the incorrect root domain is used. This is true for either the web app or the iOS app.
I have done a project find on domainname.com in both projects (my iOS app is an ejected expo app so the search included Xcode files for this one) and can't find any instance of the subdomain being missing in either codebase (or the backend codebase for that matter) and am therefore at a loss.
I've looked throughout my firebase settings and can't find any instance of the incorrect one appearing, but am unaware of a search functionality on the platform to be certain. The Action URL (%LINK%) setting in Authentication->Templates appears to be the correct URL.
I am hoping to get to the point where irrespective of the action code settings, the same, correct root domain is used. I assume this is a configuration issue but am at a total loss about how to resolve it, so any help would be appreciated.
For reference, the action code settings in use are below:
var actionCodeSettings = {
url: 'https://app.domainname.com',
iOS: {
bundleId: 'com.domainname.app'
},
handleCodeInApp: true
}
Thanks!
In case anyone finds this in the future, it turned out for me that the issue was due to a combination of an undocumented lack of support for custom domains in dynamic links in react-native-firebase, alongside the fact that the library will only send the email links using the first selected domain in your Firebase Dynamic Links settings.
At the time of writing, the solution was to simply delete all other domains from my Dynamic Links settings, leaving only PROJECTNAME.page.link, so that this was the one that got used by the library. From there everything worked as expected.
Firebase Dynamic Links do not survive on iOS 11.3.1 when user don't have installed. Anyone else experiencing this issue? This works fine prior to iOS 11.3.1
Repro steps::
Click on FDL link
User redirected to app store
User install app
User open app
FDL params not passed
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
//the url here returns:
//google/link/?match_type=none&match_message=No pre-install link matched for this device.
or
//google/link/?dismiss=1&is_weak_match=1
}
I've reported this to Firebase and they're still working on the fix.
https://github.com/firebase/firebase-ios-sdk/issues/1244
In the meantime, the workaround is to turn off the forcedRedirectEnabled.
FIRDynamicLinkNavigationInfoParameters *navigationParams = [FIRDynamicLinkNavigationInfoParameters parameters];
navigationParams.forcedRedirectEnabled = NO;
components.navigationInfoParameters = navigationParams;
or if you use the admin console to generate the link, you need to leave the Skip the app preview page setting unchecked.
Note that this means users will see one interstitial page before it redirect to app store, which is not ideal but at least FDL params will be passed.
Hope this helps someone.
Cheers!
I had the same issue.
And I found that when I delete FirebaseDeepLinkPasteboardRetrievalEnabled in Info.plist the problem is resolved
https://firebase.google.com/docs/dynamic-links/ios/receive
Optional: Disable the Dynamic Links SDK's use of the iOS pasteboard.
By default, the Dynamic Links SDK uses the pasteboard to improve the
reliablity of post-install deep links. By using the pasteboard,
Dynamic Links can make sure that when a user opens a Dynamic Link but
needs to install your app first, the user can go immediately to the
original linked content when opening the app for the first time after
installation.
The downside of this is that use of the pasteboard triggers a
notification on iOS 14 and later. So, the first time users open your
app, if the pasteboard contains a URL, they will see a notification
that your app accessed the pasteboard, which can cause confusion.
To disable this behavior, edit your Xcode project's Info.plist file
and set the FirebaseDeepLinkPasteboardRetrievalEnabled key to NO.
I am using WSO2IS 5.3.0 version.
I updated all the configs but mistakenly i gave wrong password reset url in [IS_HOME]/repository/conf/email/email-admin-config.xml file. I started my server with RDBMS as datasource. Everything worked well.
Then I noticed my password reset url is wrong. Again I went to [IS_HOME]/repository/conf/email/email-admin-config.xml file and updated the url and restarted WSO2. But it is not working for all the users. Some users still getting old template with wrong url. I restarted my WSO2 multiple times and updated the xml file but no luck. I even tried to change the template through carbon admin UI but still it is sending wrong template.
The weird thing is it is sending right one immediately after i restart WSO2 but after sometimes it start using old template. How can I solve this issue without reconfigure everything from beginning?
Let's me explain how the email-admin-config.xml works. This file works as the bootstrap data required to populate email templates in WSO2 Identity Server. So whenever you create a tenant initial data related to email templates will be read from here.
So we basically read the file during the first startup (ie. creation of carbon.super tenant) and any new tenant creation of the server and write the content to the database. Thereafter any change you want to do needs to be done with the UI provided in the Managment Console.
Restarting the server won't make the changes apply to existing tenants that were created before changes were made to email-admin-config.xml. But if you create a new tenant the updated content will be read from the email-admin-config.xml.
Hope this clarifies your concerns.
Adding to #farasath's answer. You can also use a SOAP service to change the template programmatically. For that, you can use AccountCredentialMgtConfigService. The service contract can be accessed from.
https://<host>:<port>/services/AccountCredentialMgtConfigService?wsdl
However to access the WSDL, you have to set HideAdminServices property to false first at <IS_HOME>/repository/conf/carbon.xml and restart the server.
Also, in the management console, the email template management UI can be found under Manage section on the left side panel.
I am trying to sign users into my application using an external app. In this case, facebook. I am using cloud 9, so I don't have the meteor app(ide) downloaded on my pc. Anytime I try to use facebooks activation, i get this error:
"Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains."
I already created my app on facebook. The uri uses: http://0.0.0.0:8080
That's not what I set it to use on facebook. Any pointers on fixing this?
Found the answer. You can export your app so that it runs on the right url you want it to.
Command: $ export ROOT_URL='https://-.c9.io/'
This gets rid of 0.0.8080 or whatever.
Check this question for reference: Meteor accounts-twitter unable to get working
I have created a facebook application to add a page tab in any facebook page.
for this i have a pagetab name in facebook integration of application's setting part.
Suppose i have added the name as "MyFbTab"
Now the problem is when someone add my application to his page then a tab will be added with name MyFbTab , but i want to ask user for a name and then the tab created with the name entered .
I am using facebook js sdk for this
So please help regarding to fb js sdk
I have found a method for this in php sdk but want to do this in js sdk
regards
You can use the API to change the name given to an installed page tab, see here:
https://developers.facebook.com/docs/reference/api/page/#tabs
Short version, make a POST request to
/PAGE_ID/tabs/APP_ID?custom_name=MyPageTabName&access_token=PAGE_ACCESS_TOKEN
{edit}
In the Javascript SDK you won't be able to do this directly because the Javascrtipt SDK will be using the user's access token and you'll need to make that call with the page access token you retrieved from the user's /accounts connection earlier.
OAuthException "(#210) Subject must be a page." has an example of someone using Jquery to take the page access token and make the API call that way. In their case they're using it to install a tab rather than edit an existing one, but it's almost exactly the same for your problem