错误:redirect_uri_mismatch Ruby on Rails使用Device

时间:2018-01-15 15:13:16

标签: ruby-on-rails ruby devise oauth-2.0 google-authentication

我正在尝试使用gem // Create the context with a 5 second batch size val sparkConf = new SparkConf().setAppName("SparkScript").set("spark.driver.allowMultipleContexts", "true").set("spark.streaming.concurrentJobs", "3").setMaster("local[4]") val sc = new SparkContext(sparkConf) val ssc = new StreamingContext(sc, Seconds(3)) case class Thema(name: String, metadata: String) case class Tempo(unit: String, count: Int, metadata: String) case class Spatio(unit: String, metadata: String) case class Stt(spatial: Spatio, temporal: Tempo, thematic: Thema) case class Location(latitude: Double, longitude: Double, name: String) case class Datas1(location : Location, timestamp : String, windspeed : Double, direction: String, strenght : String) case class Sensors1(sensor_name: String, start_date: String, end_date: String, data1: Datas1, stt: Stt) val kafkaParams = Map[String, Object]( "bootstrap.servers" -> "0.0.0.178:9092", "key.deserializer" -> classOf[StringDeserializer].getCanonicalName, "value.deserializer" -> classOf[StringDeserializer].getCanonicalName, "group.id" -> "test_luca", "auto.offset.reset" -> "earliest", "enable.auto.commit" -> (false: java.lang.Boolean) ) val topics1 = Array("topics1") val s1 = KafkaUtils.createDirectStream[String, String](ssc, PreferConsistent, Subscribe[String, String](topics1, kafkaParams)).map(record => { implicit val formats = DefaultFormats parse(record.value).extract[Sensors1] } ) s1.print() s1.saveAsTextFiles("results/", "") ssc.start() ssc.awaitTermination() omniauth-google-oauth2, ~> 0.2.1

完成注册

当我在本地主机上测试谷歌注册时,我不断收到以下错误:

  

错误:redirect_uri_mismatch

     

请求中的重定向URI http://localhost:3000/users/auth/google_oauth2/callback与授权给OAuth客户端的URI不匹配。

我尝试过:

1)将http更改为https

2)在google auth面板中为网址添加尾随'/'

两者都不适合我。

我尝试在google身份验证面板中更改路径,但是当我刷新网站路径与之前相同时。

Changed path(https)

Result(the same path as before)

如果您建议添加有关此问题的更多详细信息,请随时对该问题发表评论。

0 个答案:

没有答案