locked
Iframe, cannot use an URL

    Question

  • Good evening,

    I am currently developing an application using a Google API,

    I need to use OAuth 2.0 to make user login to Google and be able to use the Google API.

    To be able to get my token i want to display the Google allowing access page into an iframe.

     

    <iframe src="https://accounts.google.com/o/oauth2/auth?...."></iframe>

     


    The thing is when i run my application nothing is displayed in the iframe and i have an error in the console:

    Navigation error occurred for URL<https//accounts.google.com/o/oauth2/auth?....> , target frame <(null)>, with error code<NO_SESSION>

    I've downloaded the MashUp sample, it does exactly the same thing with their URLs

     

    Thanks for your future answers.

    • Edited by Birssan Thursday, December 15, 2011 8:30 PM
    Thursday, December 15, 2011 8:30 PM

All replies

  • Hi Bir,

    If the Mashup sample is working OK for you it sounds like an issue with the google auth.  You could use fiddler to see how the https traffic is different between a successful and failed google auth case to try and narrow down were the problem is.  See http://blogs.msdn.com/b/fiddler/archive/2011/09/14/fiddler-and-windows-8-metro-style-applications-https-and-private-network-capabilities.aspx

    You may want to try Google support forums too and see if there are others using the google api's in Metro Style applications if you do not hear from someone on this forum with google api experience.

     

    -Jeff


    Jeff Sanders (MSFT)
    Friday, December 16, 2011 3:00 PM
    Moderator

  • The thing is when i run my application nothing is displayed in the iframe and i have an error in the console:

    Navigation error occurred for URL<https//accounts.google.com/o/oauth2/auth?....> , target frame <(null)>, with error code<NO_SESSION>

    I've downloaded the MashUp sample, it does exactly the same thing with their URLs


    I meant it doesn't work with MushUp sample, i've tryed myself with a simple URL like http://www.microsoft.com, it still does'nt work...

     

    Birssan

    Friday, December 16, 2011 4:47 PM
  • Does anyone have an idea ?
    Tuesday, December 20, 2011 6:50 PM
  • Hi Birssan,

    The Mash Up Sample seems to be working fine for me!

    You need to be really clear about what code you are using, the error you are getting and what you are attempting to do in the Mash Up Sample.  I don't think anyone understands the problem and that is why there are no replies.  Can you give a step by step example of what you are doing in the Mash Up Sample so I can reproduce the issue you are having?

    -Jeff


    Jeff Sanders (MSFT)
    Tuesday, December 20, 2011 7:02 PM
    Moderator
  • Well,

    - I downloaded the Mash Up sample

    - I opened it with VisualStudio 2011 available on the Developer Preview

    - I ran it

    Iframe exemples using URL don't work but the others work perfectly

    Wednesday, December 21, 2011 3:02 PM
  • Hi Birssan,

    You need to be very clear about what scenario you are trying and you actions.  As far as I can tell, all scenarios of the sample are working correctly.  What is this for example: "Iframe exemples using URL don't work but the others work perfectly"

    Perhaps what you are expecting to happen is not what the scenarios are designed to show.

    -Jeff


    Jeff Sanders (MSFT)
    Wednesday, December 21, 2011 3:07 PM
    Moderator
  • Good Afternoon,

    Actually scenarios which use URL don't work at all, the iframe stay empty, and VisualStudio shows this error:

    "Navigation error occurred for URL<https//accounts.google.com/o/oauth2/auth?....> , target frame <(null)>, with error code<NO_SESSION>"

    I don't think i can be more specific sorry...

     

    Birssan

    Thursday, December 22, 2011 12:23 PM
  • Hi Birssan,

    I suppose we are at an impasse then since the Mash Up sample works fine here and I cannot duplicatate the issue.  If you can at some time in the future you can give the exact and complete steps you took in the Mash up sample to get the error please feel free to post that information here.  Until then there will be no way to assist you.

    -Jeff


    Jeff Sanders (MSFT)
    Thursday, December 22, 2011 12:47 PM
    Moderator
  • Hey, Birssan, I ran into a similar problem, and the issue was the corporate firewall I was behind playing man in the middle with the SSL connection.  If you are in the US go to a coffee shop and see if it works. If you aren't - are you in a country that might be messing with the SSL packages? That would break Google OAuth.

    S


    Check out my new C# 2010 All In One for Dummies book at Amazon!
    Friday, December 23, 2011 3:38 AM
  • Well I'm in France, I don't really know if it comes from there... but the problem is not only with Google OAuth...

     

    Otherwise does anyone know an other way to use URL like a javascript popup used in browsers ? I could not find this kind of popup in libraries.

     

    Birssan

    Friday, December 23, 2011 12:07 PM